<?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: Passing macro with quotes to Oracle server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Passing-macro-with-quotes-to-Oracle-server/m-p/525593#M143020</link>
    <description>&lt;P&gt;Why are wrapping your macro variable with double quotes&lt;/P&gt;
&lt;P&gt;I don't think this&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;column&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"('A','B')"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following should suffice&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let column=('A','B');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2019 22:07:01 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-01-08T22:07:01Z</dc:date>
    <item>
      <title>Passing macro with quotes to Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-macro-with-quotes-to-Oracle-server/m-p/525592#M143019</link>
      <description>&lt;P&gt;I am trying to pass a string using a macro variable to an oracle server to extract data. The string will serve as a Where string. THe final product should be passed to the Oracle server like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Select *
from DB
where column in ('A', 'B')
quit
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, i need the column variable to be passed in using a macro variable. Here is what I am trying to solve it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let column="('A','B')";&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Select *
from DB
where column in %bquote(&amp;amp;column)
quit
;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is however generating an error, which is mostly related to the quotes I think. I tried %unquote but no luck.&lt;/P&gt;
&lt;P&gt;Anyone has a solution to this please?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 22:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-macro-with-quotes-to-Oracle-server/m-p/525592#M143019</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2019-01-08T22:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Passing macro with quotes to Oracle server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-macro-with-quotes-to-Oracle-server/m-p/525593#M143020</link>
      <description>&lt;P&gt;Why are wrapping your macro variable with double quotes&lt;/P&gt;
&lt;P&gt;I don't think this&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;column&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"('A','B')"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following should suffice&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let column=('A','B');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 22:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-macro-with-quotes-to-Oracle-server/m-p/525593#M143020</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-08T22:07:01Z</dc:date>
    </item>
  </channel>
</rss>

