<?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 %let macro variable using in proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904198#M357247</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let  A ='India','USA','UK','AUSTRALIA';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to using macro variable A in proc sql&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2023 09:42:18 GMT</pubDate>
    <dc:creator>pavank</dc:creator>
    <dc:date>2023-11-22T09:42:18Z</dc:date>
    <item>
      <title>%let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904198#M357247</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let  A ='India','USA','UK','AUSTRALIA';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to using macro variable A in proc sql&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904198#M357247</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2023-11-22T09:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904199#M357248</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
select *
from mytable
where country in(&amp;amp;A)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904199#M357248</guid>
      <dc:creator>rudfaden</dc:creator>
      <dc:date>2023-11-22T09:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904200#M357249</link>
      <description>from mytable means i donot have any table  just i have macro variable A only &lt;BR /&gt;</description>
      <pubDate>Wed, 22 Nov 2023 09:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904200#M357249</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2023-11-22T09:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904202#M357251</link>
      <description>&lt;P&gt;For what purpose do you want to use the contents of the macro variable (filtering, as part of a string, ...)?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:03:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904202#M357251</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-11-22T10:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904204#M357252</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let  A ='India','USA','UK','AUSTRALIA';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;how to using macro variable A in proc sql&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As in your &lt;A href="https://communities.sas.com/t5/SAS-Programming/how-to-get-even-and-odd-values-using-array-do-loop-in-below/m-p/902470" target="_self"&gt;last thread&lt;/A&gt;, we need you to explain a lot more about what you want. No one understands what you want, and by making your explanation one partial sentence, you are not helping yourself or us. To better help us help you, please EXPLAIN the entire problem with sufficient detail taht we know exactly what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904204#M357252</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-22T10:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904205#M357253</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;from mytable means i donot have any table just i have macro variable A only &lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And what do you want to with that variable?&lt;/P&gt;
&lt;P&gt;The where statement is the place a variable defined like A is used. (quoted strings, comma between values).&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904205#M357253</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-11-22T10:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904208#M357254</link>
      <description>&lt;P&gt;how to pass list values in proc sql&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let A ='India',&amp;nbsp; 'USA',&amp;nbsp; &amp;nbsp; 'UK',&amp;nbsp; &amp;nbsp; 'AUSTRALIA'&amp;nbsp; ;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 10:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904208#M357254</guid>
      <dc:creator>pavank</dc:creator>
      <dc:date>2023-11-22T10:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904211#M357255</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;how to pass list values in proc sql&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let A ='India',&amp;nbsp; 'USA',&amp;nbsp; &amp;nbsp; 'UK',&amp;nbsp; &amp;nbsp; 'AUSTRALIA'&amp;nbsp; ;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;to achieve what outcome from PROC SQL???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;, show us the code you want without macro variables, in other words show us the code you want with 'India','USA',&amp;nbsp;&lt;EM&gt;etc.&lt;/EM&gt; hard-coded, and then it should be easy to take that code and make use of &amp;amp;A.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 13:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904211#M357255</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-22T13:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904223#M357257</link>
      <description>What are you trying to achive?</description>
      <pubDate>Wed, 22 Nov 2023 12:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904223#M357257</guid>
      <dc:creator>rudfaden</dc:creator>
      <dc:date>2023-11-22T12:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: %let macro variable using in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904237#M357269</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/390518"&gt;@pavank&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;how to pass list values in proc sql&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let A ='India',&amp;nbsp; 'USA',&amp;nbsp; &amp;nbsp; 'UK',&amp;nbsp; &amp;nbsp; 'AUSTRALIA'&amp;nbsp; ;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where do you want to PASS it to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's forget about SQL for now and just work with normal SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you want store that string in a variable?&amp;nbsp; Add double quotes around it.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   mylist= "&amp;amp;a";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you want to store each quoted word as a value of a variable in a separate observation?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  length country $20;
  do country=&amp;amp;a ;
    output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Nov 2023 14:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/let-macro-variable-using-in-proc-sql/m-p/904237#M357269</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-22T14:56:11Z</dc:date>
    </item>
  </channel>
</rss>

