<?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 proc sql Into to create macr var with  double quotes &amp;quot; &amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632234#M187426</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I create a macro var that will get multiple values with comma between them.&lt;/P&gt;
&lt;P&gt;I want to add double quotes ""&amp;nbsp; for each value in macro var.&lt;/P&gt;
&lt;P&gt;what is the way to do it please?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data example;
input x $;
cards;
USA
EU
JAPAN
CHINA
PERU
;
Run;

proc sql noprint;
select x  into :v separated by ','
from  example  
;
quit;
%put &amp;amp;v.;
/*USA,EU,JAPAN,CHINA,PERU*/
/* I want to get values:  "USA","EU","JAPAN","CHINA","PERU" */
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 15 Mar 2020 09:26:55 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2020-03-15T09:26:55Z</dc:date>
    <item>
      <title>proc sql Into to create macr var with  double quotes " "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632234#M187426</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I create a macro var that will get multiple values with comma between them.&lt;/P&gt;
&lt;P&gt;I want to add double quotes ""&amp;nbsp; for each value in macro var.&lt;/P&gt;
&lt;P&gt;what is the way to do it please?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data example;
input x $;
cards;
USA
EU
JAPAN
CHINA
PERU
;
Run;

proc sql noprint;
select x  into :v separated by ','
from  example  
;
quit;
%put &amp;amp;v.;
/*USA,EU,JAPAN,CHINA,PERU*/
/* I want to get values:  "USA","EU","JAPAN","CHINA","PERU" */
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Mar 2020 09:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632234#M187426</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-03-15T09:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql Into to create macr var with  double quotes " "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632235#M187427</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the QUOTE() function to achieve this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data example;
input x $;
cards;
USA
EU
JAPAN
CHINA
PERU
;
Run;

proc sql noprint;
select quote(trim(x),"")  into :v separated by ','
from  example  
;
quit;
%put &amp;amp;v.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 09:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632235#M187427</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-03-15T09:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql Into to create macr var with  double quotes " "</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632236#M187428</link>
      <description>&lt;P&gt;Use the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p059exu866hqw2n0zw9aoxf3p6oj.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;QUOTE()&lt;/A&gt;&amp;nbsp;function.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 09:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Into-to-create-macr-var-with-double-quotes-quot-quot/m-p/632236#M187428</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-15T09:36:24Z</dc:date>
    </item>
  </channel>
</rss>

