<?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 SQL. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467991#M119495</link>
    <description>&lt;P&gt;No, rownum is a database specific item, not part of ANSI SQL.&amp;nbsp; You can code it simply in datastep.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jun 2018 08:17:26 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-06-06T08:17:26Z</dc:date>
    <item>
      <title>PROC SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467975#M119490</link>
      <description>&lt;P&gt;Can I use&amp;nbsp;&lt;SPAN&gt;ROWNUM Pseudo column in proc sql?&amp;nbsp; like other database statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;eg. &amp;nbsp;&amp;nbsp; PROC SQL;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;SELECT * FROM employees WHERE ROWNUM &amp;lt; 11;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; QUIT;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 06:46:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467975#M119490</guid>
      <dc:creator>katkarparam</dc:creator>
      <dc:date>2018-06-06T06:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467977#M119492</link>
      <description>&lt;P&gt;Much easier done in a data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have (obs=10);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SQL either takes much more coding:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want (drop=count) as
select *, monotonic() as count
from sashelp.class
having count &amp;lt; 11;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or will create a WARNING:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql outobs=10;
create table want as select * from sashelp.class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;to simply &lt;EM&gt;create&lt;/EM&gt; a row number, use this data step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
rownum = _n_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 09:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467977#M119492</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-06T09:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467991#M119495</link>
      <description>&lt;P&gt;No, rownum is a database specific item, not part of ANSI SQL.&amp;nbsp; You can code it simply in datastep.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 08:17:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL/m-p/467991#M119495</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-06T08:17:26Z</dc:date>
    </item>
  </channel>
</rss>

