<?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: define macro variables by proc sql into in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196561#M49145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've already gotten a number of good answers but, I have to ask, how to you plan to use the macro variables? Depending upon how you answer that question, it might end up being easier if you simply put all of the names in one macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Mar 2015 00:08:33 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2015-03-07T00:08:33Z</dc:date>
    <item>
      <title>define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196557#M49141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hi, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I am trying to store some values from a data set to a series of macro variables. Eg. the data is called &lt;STRONG&gt;temp&lt;/STRONG&gt;, variable of interest is called &lt;STRONG&gt;name&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000e6; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt; &lt;STRONG style="color: #0000e6;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="color: #0000e6;"&gt;noprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000e6;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="color: black;"&gt;count(*)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000e6;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;: inn_nvar1 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; temp&lt;/SPAN&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: #0000e6;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: #0000e6;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: black;"&gt; name &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: #0000e6;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: black;"&gt; :inxvar1 - :inxvar&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em; color: navy;"&gt;&amp;amp;inn_nvar1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; temp&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG style="color: #0000e6;"&gt;quit&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;That is, I need to first store # of unique values of &lt;STRONG&gt;name&lt;/STRONG&gt;, and then store each of them into macro variable of &lt;STRONG&gt;inxvar&lt;/STRONG&gt;. However, I am keeping getting errors due to the use of &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;amp;inn_nvar1. in second into. If I use accurate numbers, such as, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;inn_nvar1=39 and into :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;inxvar1 - :inxvar&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;39. then there is no any errors.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000;"&gt;How can I still let the number of inxvar depends on &lt;SPAN style="font-size: 13.3333330154419px;"&gt;inn_nvar1?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000;"&gt;Thanks, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000;"&gt;Sunny&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333330154419px; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 21:20:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196557#M49141</guid>
      <dc:creator>Sunny_Sun</dc:creator>
      <dc:date>2015-03-06T21:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196558#M49142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When SQL performs a numeric to character conversion (as it must, in order to store a numeric value in a macro variable), it creates leading blanks.&amp;nbsp; Just add between the two SELECT statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let inn_nvar1 = &amp;amp;inn_nvar1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will remove any leading blanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 22:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196558#M49142</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-03-06T22:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196559#M49143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is easier than you expect&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt; select distinct name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :inxvar1 - :inxvar99999&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from temp;&lt;/P&gt;&lt;P&gt;%let N_names = &amp;amp;sqlobs ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;only as many macro cariables as neccessary are created.&lt;/P&gt;&lt;P&gt;Beware that these macro variables might have trailing blanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 22:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196559#M49143</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2015-03-06T22:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196560#M49144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need the first query.&amp;nbsp; Also you can use the automatic variable SQLOBS to find out how many where found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;noprint&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; :inxvar1 - &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; inxvarN = &amp;amp;sqlobs ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using an older version of SAS you will need to set an explicit upper bound for the range of variable names (&lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;:inxvar1 - &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; background-color: #ffffff;"&gt;:inxvar&lt;/SPAN&gt;99999 ).&amp;nbsp; &lt;/P&gt;&lt;P&gt;SQL will only create enough variables to match the number of observations returned from the query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 23:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196560#M49144</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-03-06T23:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196561#M49145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've already gotten a number of good answers but, I have to ask, how to you plan to use the macro variables? Depending upon how you answer that question, it might end up being easier if you simply put all of the names in one macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Mar 2015 00:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196561#M49145</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2015-03-07T00:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196562#M49146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 13:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196562#M49146</guid>
      <dc:creator>Sunny_Sun</dc:creator>
      <dc:date>2015-03-09T13:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196563#M49147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This's cool. Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 13:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196563#M49147</guid>
      <dc:creator>Sunny_Sun</dc:creator>
      <dc:date>2015-03-09T13:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196564#M49148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool! Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 13:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196564#M49148</guid>
      <dc:creator>Sunny_Sun</dc:creator>
      <dc:date>2015-03-09T13:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196565#M49149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need the count &amp;amp; each macro variable for later uses, separately. These are all great answers and very much helpful.&amp;nbsp; Thanks for asking and have a nice day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 13:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196565#M49149</guid>
      <dc:creator>Sunny_Sun</dc:creator>
      <dc:date>2015-03-09T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: define macro variables by proc sql into</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196566#M49150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two ways :&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;STRONG style="font-style: inherit; font-family: inherit; color: #0000e6;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;noprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;count(*)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;into &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;: inn_nvar1 &lt;STRONG&gt;separated by ' '&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt; temp&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; :inxvar1 - :inxvar&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy;"&gt;&amp;amp;inn_nvar1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; temp&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #0000e6;"&gt;quit&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;STRONG style="font-style: inherit; font-family: inherit; color: #0000e6;"&gt;sql&lt;/STRONG&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;noprint&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;count(*)&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;: inn_nvar1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: black;"&gt; temp&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; name&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; :inxvar1 - :inxvar&lt;STRONG&gt;%left&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: navy;"&gt;&amp;amp;inn_nvar1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: #0000e6;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: black;"&gt; temp&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #0000e6;"&gt;quit&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 09:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/define-macro-variables-by-proc-sql-into/m-p/196566#M49150</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-03-10T09:24:22Z</dc:date>
    </item>
  </channel>
</rss>

