<?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 follow up query layer question in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348227#M19940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so i am liking query layers a lot so far in playing with them!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my current question regards how keep the order i specify for the fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is a query i am working with as an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;SELECT sde2.sde.STREETCL_ARC.OBJECTID, sde2.sde.STREETCL_ARC.Shape, sde2.sde.STREETCL_ARC.SEG_ID, LTRIM(sde2.sde.STREETCL_ARC.PRE_DIR +' ' + sde2.sde.STREETCL_ARC.ST_NAME +' ' + sde2.sde.STREETCL_ARC.ST_TYPE) AS STREETNAME, sde2.sde.STREETCL_ARC.ST_CODE, sde2.sde.STREETCL_ARC.ONEWAY, sde2.sde.STREETCL_ARC.CLASS, sde2.sde.BIKE_NETWORK_TBL_NEW.TYPE FROM sde2.sde.STREETCL_ARC&amp;nbsp; RIGHT OUTER JOIN sde2.sde.BIKE_NETWORK_TBL_NEW ON sde2.sde.STREETCL_ARC.seg_id = sde2.sde.BIKE_NETWORK_TBL_NEW.SEG_ID&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this makes a nice query layer with all the info i want HOWEVER if you notice i concatinate the field STREETNAME from a few fields. whenever the query layer is displayed this field shows up last. is there anyway to preserve the order i specify above (keep STREETNAME as the 4th column between SEG_ID and ST_CODE)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 17:37:50 GMT</pubDate>
    <dc:creator>maxsteinbrenner</dc:creator>
    <dc:date>2012-03-15T17:37:50Z</dc:date>
    <item>
      <title>follow up query layer question</title>
      <link>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348227#M19940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so i am liking query layers a lot so far in playing with them!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my current question regards how keep the order i specify for the fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is a query i am working with as an example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;SELECT sde2.sde.STREETCL_ARC.OBJECTID, sde2.sde.STREETCL_ARC.Shape, sde2.sde.STREETCL_ARC.SEG_ID, LTRIM(sde2.sde.STREETCL_ARC.PRE_DIR +' ' + sde2.sde.STREETCL_ARC.ST_NAME +' ' + sde2.sde.STREETCL_ARC.ST_TYPE) AS STREETNAME, sde2.sde.STREETCL_ARC.ST_CODE, sde2.sde.STREETCL_ARC.ONEWAY, sde2.sde.STREETCL_ARC.CLASS, sde2.sde.BIKE_NETWORK_TBL_NEW.TYPE FROM sde2.sde.STREETCL_ARC&amp;nbsp; RIGHT OUTER JOIN sde2.sde.BIKE_NETWORK_TBL_NEW ON sde2.sde.STREETCL_ARC.seg_id = sde2.sde.BIKE_NETWORK_TBL_NEW.SEG_ID&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this makes a nice query layer with all the info i want HOWEVER if you notice i concatinate the field STREETNAME from a few fields. whenever the query layer is displayed this field shows up last. is there anyway to preserve the order i specify above (keep STREETNAME as the 4th column between SEG_ID and ST_CODE)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 17:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348227#M19940</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2012-03-15T17:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: follow up query layer question</title>
      <link>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348228#M19941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I doubt the query code does any re-ordering of the SQL expression...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which RDBMS are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What happens when you issue the same SQL as a command at the SQL prompt?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: If you include your SQL in multi-line format, you'll probably get more folks to read it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;SELECT sde2.sde.STREETCL_ARC.OBJECTID,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.Shape, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.SEG_ID,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LTRIM(sde2.sde.STREETCL_ARC.PRE_DIR +' '&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; + sde2.sde.STREETCL_ARC.ST_NAME +' ' &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + sde2.sde.STREETCL_ARC.ST_TYPE) AS STREETNAME, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.ST_CODE, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.ONEWAY,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.CLASS,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.BIKE_NETWORK_TBL_NEW.TYPE FROM&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC&amp;nbsp; RIGHT OUTER JOIN sde2.sde.BIKE_NETWORK_TBL_NEW ON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde2.sde.STREETCL_ARC.seg_id = sde2.sde.BIKE_NETWORK_TBL_NEW.SEG_ID&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 19:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348228#M19941</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-03-15T19:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: follow up query layer question</title>
      <link>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348229#M19942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hmmm, i can't get it to replicate the problem again this morning... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;probably user error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again for your help, and the tip on proper sql query code indentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 11:35:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/follow-up-query-layer-question/m-p/348229#M19942</guid>
      <dc:creator>maxsteinbrenner</dc:creator>
      <dc:date>2012-03-16T11:35:00Z</dc:date>
    </item>
  </channel>
</rss>

