<?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: Proc FEDSQL and Order By in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/770322#M1119</link>
    <description>&lt;P&gt;Did you find a solution to your question? I'm getting the same error. Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 24 Sep 2021 17:42:41 GMT</pubDate>
    <dc:creator>Naz10</dc:creator>
    <dc:date>2021-09-24T17:42:41Z</dc:date>
    <item>
      <title>Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751372#M1001</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recently I came across an article '&lt;A href="https://communities.sas.com/kntur85557/attachments/kntur85557/askexpert/191/1/26Aug.BestPracticesMigratingCode2CAS.pdf" target="_self"&gt;Best Practices for Migrating SAS Code to Leverage CAS&lt;/A&gt;' - Page 43 that says we can use Order By in Proc Fedsql and running on CAS.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql sessref=casauto;
create table baseball_desc as
select distinct a.*
from baseball a
order by team DESC;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried and got error msg saying this is not supported.&lt;/P&gt;&lt;PRE&gt;ERROR: Unsupported operation in FedSQL query: ORDER BY.
ERROR: The action stopped due to errors.
ERROR: The FedSQL action was not successful.&lt;/PRE&gt;&lt;P&gt;I searched the net and found many examples for emulating proc sort or to run order by in proc sql before uploading the ordered data to CAS.&amp;nbsp; What are the options for doing sorting in CAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 23:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751372#M1001</guid>
      <dc:creator>Will168</dc:creator>
      <dc:date>2021-06-30T23:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751382#M1002</link>
      <description>&lt;P&gt;Out of curiosity, what version of Viya are you using? The article you refer to looks to be referencing Viya 3.4.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 02:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751382#M1002</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-07-01T02:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751383#M1003</link>
      <description>&lt;P&gt;We are using SAS Viya 3.5&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 02:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/751383#M1003</guid>
      <dc:creator>Will168</dc:creator>
      <dc:date>2021-07-01T02:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/770322#M1119</link>
      <description>&lt;P&gt;Did you find a solution to your question? I'm getting the same error. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 17:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/770322#M1119</guid>
      <dc:creator>Naz10</dc:creator>
      <dc:date>2021-09-24T17:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/770356#M1121</link>
      <description>&lt;P&gt;Are you sure the CAS object you are trying to create actually supports the concept of "order"?&lt;/P&gt;
&lt;P&gt;Order BY is something you normally only need for printing reports.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 21:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/770356#M1121</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-24T21:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/784743#M1258</link>
      <description>&lt;P&gt;And to add on to this comment...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying a similar operation in Proc FedSQL and received the same error message, and I found that it worked when I omitted the "CREATE TABLE... AS" statement. I believe it's not supported when creating a table, only when printing the output of the table.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 20:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/784743#M1258</guid>
      <dc:creator>suprax1979</dc:creator>
      <dc:date>2021-12-07T20:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FEDSQL and Order By</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/841334#M1524</link>
      <description>&lt;P&gt;jsut another behavior to be aware of. FEDSQL can't order by a calculated column, so any ordering has to be in a separate step, once the column has been built in a prior step.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 16:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Proc-FEDSQL-and-Order-By/m-p/841334#M1524</guid>
      <dc:creator>sqlGoddess</dc:creator>
      <dc:date>2022-10-28T16:17:24Z</dc:date>
    </item>
  </channel>
</rss>

