<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706999#M23434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An ArcPy Data Access Search Cursor represents a result set returned by querying the underlying data store.&amp;nbsp; Whether SQL or noSQL data store, result set ordering is typically not guaranteed unless an ORDER BY clause or operator is specified when querying the data store.&amp;nbsp; This is documented in some way, shape, or form by all the data store vendors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql"&gt;SELECT - ORDER BY Clause (Transact-SQL)&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P class="" data-lf-anchor-id="8fb7659147b714b481c508cb4b71aef3:0" style="margin-top: 1rem; margin-bottom: 0px; position: relative !important; padding-right: 25px !important; color: #000000; font-family: segoe-ui_normal, 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Sorts data returned by a query in SQL Server. Use this clause to:&lt;/P&gt;&lt;UL class="" data-lf-anchor-id="8fb56defd39b1f84384db8423db72357:0" style="margin: 16px 0px 16px 38px; position: relative !important; color: #000000; font-family: segoe-ui_normal, 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; padding: 0px 25px !important 0px 0px;"&gt;&lt;LI style="list-style: disc outside none;"&gt;&lt;P class="" style="margin-top: 1rem; margin-bottom: 0px; position: relative !important; padding-right: 25px !important;"&gt;Order the result set of a query by the specified column list and, optionally, limit the rows returned to a specified range. The order in which rows are returned in a result set are not guaranteed unless an ORDER BY clause is specified.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#i2171079"&gt;Database SQL Language Reference - ORDER BY Clause (Oracle)&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;ORDER&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;BY&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clause to order rows returned by the statement. Without an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-style: italic;"&gt;order_by_clause&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;, no guarantee exists that the same query executed more than once will retrieve rows in the same order.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A class="link-titled" href="https://docs.mongodb.com/manual/reference/method/cursor.sort/" title="https://docs.mongodb.com/manual/reference/method/cursor.sort/"&gt;cursor.sort() — MongoDB Manual 3.6&lt;/A&gt;&amp;nbsp;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;H3 style="box-sizing: border-box; margin: 24px 0px; font-family: Akzidenz, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; line-height: 24px; font-size: 18px; color: #313030; padding: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Result Ordering&lt;/H3&gt;&lt;P style="box-sizing: border-box; margin: 0px 0px 24px; padding: 0px; text-indent: 0px; color: #494747; font-family: Akzidenz, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Unless you specify the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.mongodb.com/manual/reference/method/cursor.sort/#cursor.sort" style="box-sizing: border-box; text-decoration: none; color: #006cbc;" title="cursor.sort()"&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace; font-size: 1em; color: #006cbc; font-weight: 400;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace;"&gt;sort()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method or use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.mongodb.com/manual/reference/operator/query/near/#op._S_near" style="box-sizing: border-box; text-decoration: none; color: #006cbc;" title="$near"&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace; font-size: 1em; color: #006cbc; font-weight: 400;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace;"&gt;$near&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;operator, MongoDB does&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="box-sizing: border-box; font-weight: bold;"&gt;not&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;guarantee the order of query results.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, Esri's documentation of file geodatabase behavior is still weak in areas, even after all these years.&amp;nbsp; Since it is common for data in file geodatabases to be stored sorted by ObjectID, the results of an unsorted query tend to look ordered by ObjectID.&amp;nbsp; Is ordering by ObjectID guaranteed without an ORDER BY clause?&amp;nbsp; I always err on the side of "no" if I am in a situation where the ordering of the result set truly matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ArcGIS Sort tool is really about ordering the storage of records, not guaranteeing a result set from the data will be ordered.&amp;nbsp; One could ask, "if result set ordering isn't guaranteed using the Sort tool, why bother sorting the storage of records?"&amp;nbsp; It is a fair question, and the answer lies in efficiency of managing and query data.&amp;nbsp; The real strength of the ArcGIS Sort tool is its ability to sort data sets spatially, which can greatly improve the performance of spatial operations against data sets:&amp;nbsp; &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/how-sort-works.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/how-sort-works.htm"&gt;How Sort (management) works—Help | ArcGIS Desktop&lt;/A&gt; :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;The power of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="-webkit-font-smoothing: antialiased; color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;A class="" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/sort.htm" style="color: #007ac2; text-decoration: none;"&gt;Sort&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tool lies in its ability to sort the features spatially. Once sorted spatially, efficiency of spatial or geometric operations is enhanced.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2018 15:19:51 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2018-03-13T15:19:51Z</dc:date>
    <item>
      <title>Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706997#M23432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Arc Desktop 10.5 - Standard, and I've been running into an issue with a simple script that&amp;nbsp;only exports a domain to an in_memory table, then outputs the domain as another in_memory table sorted on the code field. The problem is, the record order of the "sorted" dataset comes back seemingly randomized whenever I feed arcpy.Sort_management an in_memory input table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, this will return a random order result:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;notWorking&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; inputWorkSpace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domain&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rawDomain &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DomainToTable_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inputWorkSpace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"in_memory/domain"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"code"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"description"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sortedDomain &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Sort_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; rawDomain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"in_memory/sorted"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"code"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ASCENDING"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; sortedDomain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{} {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍

&lt;SPAN class="string token"&gt;"""
Output on domain originally defined as:

C: Charlie
E: Echo
A: Alpha
D: Delta
B: Bravo


&amp;gt;&amp;gt;&amp;gt;
1 B
2 C
3 A
4 E
5 D
"""&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile, if I store the Sort_management's input in a gdb, it works just fine:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;works&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; inputWorkSpace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; temporaryWorkSpace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rawDomain &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DomainToTable_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inputWorkSpace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; domain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; temporaryWorkSpace &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\\domain"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"code"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"description"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sortedDomain &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Sort_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; rawDomain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"in_memory/sorted"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"code"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ASCENDING"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; sortedDomain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{} {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="string token"&gt;"""
Output on domain originally defined as:

C: Charlie
E: Echo
A: Alpha
D: Delta
B: Bravo


&amp;gt;&amp;gt;&amp;gt;
1 A
2 B
3 C
4 D
5 E
"""&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a sample data set with a domain called "testDomain", but I've experienced this with every source (gdb/sde db) and domain I've tried.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I have a work-around to get what I need done, I was wondering if there was a bug going on or if I'm missing something basic. Thanks in advance for any insight.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706997#M23432</guid>
      <dc:creator>SavenRoybal1</dc:creator>
      <dc:date>2021-12-12T05:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706998#M23433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmm sample.gdb is totally empty in 10.6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 02:16:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706998#M23433</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-13T02:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706999#M23434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An ArcPy Data Access Search Cursor represents a result set returned by querying the underlying data store.&amp;nbsp; Whether SQL or noSQL data store, result set ordering is typically not guaranteed unless an ORDER BY clause or operator is specified when querying the data store.&amp;nbsp; This is documented in some way, shape, or form by all the data store vendors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql"&gt;SELECT - ORDER BY Clause (Transact-SQL)&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P class="" data-lf-anchor-id="8fb7659147b714b481c508cb4b71aef3:0" style="margin-top: 1rem; margin-bottom: 0px; position: relative !important; padding-right: 25px !important; color: #000000; font-family: segoe-ui_normal, 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Sorts data returned by a query in SQL Server. Use this clause to:&lt;/P&gt;&lt;UL class="" data-lf-anchor-id="8fb56defd39b1f84384db8423db72357:0" style="margin: 16px 0px 16px 38px; position: relative !important; color: #000000; font-family: segoe-ui_normal, 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; padding: 0px 25px !important 0px 0px;"&gt;&lt;LI style="list-style: disc outside none;"&gt;&lt;P class="" style="margin-top: 1rem; margin-bottom: 0px; position: relative !important; padding-right: 25px !important;"&gt;Order the result set of a query by the specified column list and, optionally, limit the rows returned to a specified range. The order in which rows are returned in a result set are not guaranteed unless an ORDER BY clause is specified.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#i2171079"&gt;Database SQL Language Reference - ORDER BY Clause (Oracle)&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;ORDER&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;BY&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clause to order rows returned by the statement. Without an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE dir="ltr" style="box-sizing: border-box; font-family: menlo, monaco, 'Courier New', Courier, mono, serif; font-size: 13px; color: #000000; line-height: 1.615; padding: 3px 0px; font-weight: normal; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-style: italic;"&gt;order_by_clause&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', 'Neue Helvetica', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 300; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;, no guarantee exists that the same query executed more than once will retrieve rows in the same order.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A class="link-titled" href="https://docs.mongodb.com/manual/reference/method/cursor.sort/" title="https://docs.mongodb.com/manual/reference/method/cursor.sort/"&gt;cursor.sort() — MongoDB Manual 3.6&lt;/A&gt;&amp;nbsp;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;H3 style="box-sizing: border-box; margin: 24px 0px; font-family: Akzidenz, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: bold; line-height: 24px; font-size: 18px; color: #313030; padding: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Result Ordering&lt;/H3&gt;&lt;P style="box-sizing: border-box; margin: 0px 0px 24px; padding: 0px; text-indent: 0px; color: #494747; font-family: Akzidenz, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;Unless you specify the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.mongodb.com/manual/reference/method/cursor.sort/#cursor.sort" style="box-sizing: border-box; text-decoration: none; color: #006cbc;" title="cursor.sort()"&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace; font-size: 1em; color: #006cbc; font-weight: 400;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace;"&gt;sort()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method or use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.mongodb.com/manual/reference/operator/query/near/#op._S_near" style="box-sizing: border-box; text-decoration: none; color: #006cbc;" title="$near"&gt;&lt;CODE class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace; font-size: 1em; color: #006cbc; font-weight: 400;"&gt;&lt;SPAN class="" style="box-sizing: border-box; font-family: 'Source Code Pro', monospace;"&gt;$near&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;operator, MongoDB does&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="box-sizing: border-box; font-weight: bold;"&gt;not&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;guarantee the order of query results.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, Esri's documentation of file geodatabase behavior is still weak in areas, even after all these years.&amp;nbsp; Since it is common for data in file geodatabases to be stored sorted by ObjectID, the results of an unsorted query tend to look ordered by ObjectID.&amp;nbsp; Is ordering by ObjectID guaranteed without an ORDER BY clause?&amp;nbsp; I always err on the side of "no" if I am in a situation where the ordering of the result set truly matters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ArcGIS Sort tool is really about ordering the storage of records, not guaranteeing a result set from the data will be ordered.&amp;nbsp; One could ask, "if result set ordering isn't guaranteed using the Sort tool, why bother sorting the storage of records?"&amp;nbsp; It is a fair question, and the answer lies in efficiency of managing and query data.&amp;nbsp; The real strength of the ArcGIS Sort tool is its ability to sort data sets spatially, which can greatly improve the performance of spatial operations against data sets:&amp;nbsp; &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/how-sort-works.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/how-sort-works.htm"&gt;How Sort (management) works—Help | ArcGIS Desktop&lt;/A&gt; :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;The power of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="-webkit-font-smoothing: antialiased; color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;A class="" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/sort.htm" style="color: #007ac2; text-decoration: none;"&gt;Sort&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tool lies in its ability to sort the features spatially. Once sorted spatially, efficiency of spatial or geometric operations is enhanced.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/706999#M23434</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-03-13T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707000#M23435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you not seeing a feature class called "dummyDataset"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707000#M23435</guid>
      <dc:creator>SavenRoybal1</dc:creator>
      <dc:date>2018-03-13T15:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707001#M23436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the sort tool is supposed to guarantee a sort on the designated field(s).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question was regarding if there is a bug related to using memory stored datasets with the sort tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:36:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707001#M23436</guid>
      <dc:creator>SavenRoybal1</dc:creator>
      <dc:date>2018-03-13T15:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707002#M23437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at your code, how do you know the data isn't sorted correctly in-memory and the search cursor is just returning the results in different order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 17:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707002#M23437</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-03-13T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a bug with sorting in_memory tables using arcpy.Sort_management?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707003#M23438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Saven, When I loaded it last night, the gdb was empty... don't know if it was a 10.6 thing, or it was actually empty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 18:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/is-there-a-bug-with-sorting-in-memory-tables-using/m-p/707003#M23438</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-03-13T18:44:29Z</dc:date>
    </item>
  </channel>
</rss>

