<?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 - Oracle in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316021#M68990</link>
    <description>while using macro variable use double quotes as&lt;BR /&gt;   "&amp;amp;ana_run" to resolve the macro</description>
    <pubDate>Thu, 01 Dec 2016 17:58:44 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-12-01T17:58:44Z</dc:date>
    <item>
      <title>PROC SQL - Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/315980#M68977</link>
      <description>&lt;P&gt;Hi SAS users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help with solving this macro in PROC SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CONNECT TO ORACLE(PATH=XXXX USER=YYYY. ORAPW=ZZZ);&lt;BR /&gt;execute (delete from A.&amp;amp;MyTable&lt;BR /&gt;where substr(RUN_DT,1,7) = &amp;amp;ANA_RUN_DT &amp;nbsp; &amp;nbsp;(RUN_DT is a charcter field in table)&lt;BR /&gt;) by oracle;&lt;BR /&gt;disconnect from oracle;&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ANA_RUN_DT is &amp;nbsp;2016-11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error &amp;nbsp;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: ORACLE execute error: ORA-01722: invalid number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried putting&amp;nbsp;"&lt;SPAN&gt;&amp;amp;ANA_RUN_DT" and &amp;nbsp;'&amp;amp;ANA_RUN_DT' , but it did not work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ana&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 15:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/315980#M68977</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2016-12-01T15:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316020#M68989</link>
      <description>&lt;P&gt;I have little experience with oracle sql, anyhow&lt;/P&gt;
&lt;P&gt;oracle date is a numeric variable while 2016-11 is a character variable.&lt;/P&gt;
&lt;P&gt;You should ask oracle experts how to write this code line.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 17:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316020#M68989</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T17:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316021#M68990</link>
      <description>while using macro variable use double quotes as&lt;BR /&gt;   "&amp;amp;ana_run" to resolve the macro</description>
      <pubDate>Thu, 01 Dec 2016 17:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316021#M68990</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T17:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL - Oracle</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316029#M68993</link>
      <description>&lt;P&gt;I suspect that ORACLE wants you to use single quotes, but SAS will not expand the macro variable reference inside of single quotes.&lt;/P&gt;
&lt;P&gt;Try this instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%unquote(%bquote('&amp;amp;ana_run_dt'))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:19:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Oracle/m-p/316029#M68993</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-12-01T18:19:22Z</dc:date>
    </item>
  </channel>
</rss>

