<?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 Sort to Proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534512#M146674</link>
    <description>&lt;P&gt;Can you post a sample data for folks to test plz&lt;/P&gt;</description>
    <pubDate>Mon, 11 Feb 2019 16:13:24 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-02-11T16:13:24Z</dc:date>
    <item>
      <title>Proc Sort to Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534510#M146672</link>
      <description>&lt;P&gt;Hi Channel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run the following code but not getting identical results&lt;/P&gt;&lt;P&gt;please advice&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC SORT DATA = A OUT = B;&lt;BR /&gt;BY T;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE B AS SELECT *&lt;BR /&gt;FROM A&lt;BR /&gt;GROUP BY T&lt;BR /&gt;ORDER BY T&lt;BR /&gt;;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 16:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534510#M146672</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-02-11T16:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sort to Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534512#M146674</link>
      <description>&lt;P&gt;Can you post a sample data for folks to test plz&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 16:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534512#M146674</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-02-11T16:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sort to Proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534518#M146677</link>
      <description>&lt;P&gt;PROC SQL does not guarantee the order of the observations as they are read in.&amp;nbsp; It can very well read observations from A in a different order than they appear within A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SORT does guarantee the incoming order is the same as the order in A.&amp;nbsp; However, there is a further complication depending on whether the option EQUALS (usually the default) or NOEQUALS is in effect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the observations take on unique values for T, you will always get the same result.&amp;nbsp; If there might be multiple observations for the same value of T, you can get different results.&amp;nbsp; In both cases, the output will be sorted by T.&amp;nbsp; But within identical values of T, the order can be different.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 16:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sort-to-Proc-sql/m-p/534518#M146677</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-11T16:23:08Z</dc:date>
    </item>
  </channel>
</rss>

