<?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: SAS EG 4.2 sql error in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114732#M9733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Your SQL looks like Oracle's SQL syntax.&lt;/P&gt;&lt;P&gt;As far as I know, SAS SQL does not support the "Over" syntax. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jan 2013 13:09:31 GMT</pubDate>
    <dc:creator>AhmedAl_Attar</dc:creator>
    <dc:date>2013-01-04T13:09:31Z</dc:date>
    <item>
      <title>SAS EG 4.2 sql error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114731#M9732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I received an query from user as below.&lt;/P&gt;&lt;P&gt;Proc sql;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Create table test1 as &lt;/P&gt;&lt;P&gt;(select M.* &lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select A.*, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(distinct po) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; over (partition by system, id, key, cd)as cnt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp; test A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )M &lt;/P&gt;&lt;P&gt;where cnt&amp;gt;1&lt;/P&gt;&lt;P&gt;group BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 ,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When running the query user is getting an error&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;&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; CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&amp;nbsp; &lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;Is this because of the "over partition by system"?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 08:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114731#M9732</guid>
      <dc:creator>HashimBasheer</dc:creator>
      <dc:date>2013-01-04T08:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG 4.2 sql error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114732#M9733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Your SQL looks like Oracle's SQL syntax.&lt;/P&gt;&lt;P&gt;As far as I know, SAS SQL does not support the "Over" syntax. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114732#M9733</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2013-01-04T13:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG 4.2 sql error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114733#M9734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ahmed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think there is a better way to modify the query?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114733#M9734</guid>
      <dc:creator>HashimBasheer</dc:creator>
      <dc:date>2013-01-04T13:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG 4.2 sql error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114734#M9735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably would have to break the query into multiple queries/tables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 13:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114734#M9735</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2013-01-04T13:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG 4.2 sql error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114735#M9736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OVER is a feature of SQL 2003 that SAS hasn't implemented at this point, that allows for "Determining the partitioning and ordering of a rowset before the associated window function is applied." (I've never used it myself).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll have to either restructure your query for SAS, or, if your query is to an exernal database, use pass-through to pass the OVER clause to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 20:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-EG-4-2-sql-error/m-p/114735#M9736</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-01-04T20:00:52Z</dc:date>
    </item>
  </channel>
</rss>

