<?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: Syntax error in Proc SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104135#M291335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace &lt;STRONG&gt;position('~' in A.PROV_ID )&lt;/STRONG&gt; by&lt;STRONG&gt; findc(A.PROV_ID, '~').&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PG&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2012 19:46:36 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-08-24T19:46:36Z</dc:date>
    <item>
      <title>Syntax error in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104133#M291333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One of my colleagues is getting a syntax error with proc sql. The code and the error is below -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt;substr(a.PROV_ID,(position('~' in A.PROV_ID )+1),3) as MBR_PCP_SITE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; 79&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt;"&gt;ERROR 79-322: Expecting a SELECT.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt;"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: #000000; font-size: 10pt;"&gt;Any suggestions would be appreciated. The DB engine is teradata.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: #000000; font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; background: white; color: #000000; font-size: 10pt;"&gt;saspert.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 19:11:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104133#M291333</guid>
      <dc:creator>saspert</dc:creator>
      <dc:date>2012-08-24T19:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104134#M291334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that you can use the "IN" operator from base SAS in PROC SQL; it gets confused with the "IN" condition from a SELECT statement.&amp;nbsp; You can probably reframe the position function using the INDEXC function to get around the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 19:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104134#M291334</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-08-24T19:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104135#M291335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Replace &lt;STRONG&gt;position('~' in A.PROV_ID )&lt;/STRONG&gt; by&lt;STRONG&gt; findc(A.PROV_ID, '~').&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PG&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 19:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-in-Proc-SQL/m-p/104135#M291335</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-08-24T19:46:36Z</dc:date>
    </item>
  </channel>
</rss>

