<?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 insert issue with macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53960#M11369</link>
    <description>Hi:&lt;BR /&gt;
  In addition to Daniel's advice, you might find this paper useful. It contains an overview of the SAS Macro Facility:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Mon, 08 Feb 2010 15:42:19 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-02-08T15:42:19Z</dc:date>
    <item>
      <title>PROC SQL insert issue with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53958#M11367</link>
      <description>I am constructing a little dataset based on some variables using SQL but I am having a problem with inserting the data with the contents of a variable. &lt;BR /&gt;
&lt;BR /&gt;
This is what I have &lt;BR /&gt;
&lt;BR /&gt;
Test dataset created...&lt;BR /&gt;
&lt;BR /&gt;
%let testvar=XYZ;&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
insert into test;&lt;BR /&gt;
values ('test field text &amp;amp;testvar. ');&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
This .sas file is not a macro? Does it have to be to translate the contents of the variable as it does not at the moment?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Lee

Message was edited by: Lee2010</description>
      <pubDate>Mon, 08 Feb 2010 13:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53958#M11367</guid>
      <dc:creator>LeeJenson</dc:creator>
      <dc:date>2010-02-08T13:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL insert issue with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53959#M11368</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
Replace the single quotes with double quotes.&lt;BR /&gt;
&lt;BR /&gt;
Macro variables do not get resolved to their values inside single quoting.&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Mon, 08 Feb 2010 14:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53959#M11368</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-02-08T14:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL insert issue with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53960#M11369</link>
      <description>Hi:&lt;BR /&gt;
  In addition to Daniel's advice, you might find this paper useful. It contains an overview of the SAS Macro Facility:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/056-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/056-28.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 08 Feb 2010 15:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53960#M11369</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-08T15:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL insert issue with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53961#M11370</link>
      <description>Sorry...&lt;BR /&gt;
that's twice that has caught me out and you have provided me with the answer.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Lee</description>
      <pubDate>Thu, 25 Feb 2010 13:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-insert-issue-with-macro-variable/m-p/53961#M11370</guid>
      <dc:creator>LeeJenson</dc:creator>
      <dc:date>2010-02-25T13:32:23Z</dc:date>
    </item>
  </channel>
</rss>

