<?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: Error in simple code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466533#M119047</link>
    <description>TOP 2 is not valid SAS syntax. You can OUTOBS= on the PROC SQL statement instead.</description>
    <pubDate>Thu, 31 May 2018 16:07:21 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-05-31T16:07:21Z</dc:date>
    <item>
      <title>Error in simple code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466529#M119045</link>
      <description>&lt;P&gt;I'm trying to view the contents of a dataset in the SASHelp library, but it gives me these errors. I'm not sure what is wrong with my simple code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;Select top 2 * from sashelp.aacomp;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors:&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 16:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466529#M119045</guid>
      <dc:creator>astha8882000</dc:creator>
      <dc:date>2018-05-31T16:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error in simple code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466533#M119047</link>
      <description>TOP 2 is not valid SAS syntax. You can OUTOBS= on the PROC SQL statement instead.</description>
      <pubDate>Thu, 31 May 2018 16:07:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466533#M119047</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-31T16:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error in simple code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466581#M119056</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122200"&gt;@astha8882000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I'm trying to view the contents of a dataset in the SASHelp library, but it gives me these errors. I'm not sure what is wrong with my simple code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;Select top 2 * from sashelp.aacomp;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Errors:&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;
&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your select has two items, a variable called top and the literal 2. These items need to be separated by a comma to get valid SQL syntax.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 18:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-simple-code/m-p/466581#M119056</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-31T18:29:11Z</dc:date>
    </item>
  </channel>
</rss>

