<?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: dynamic column name in proc sql with macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404197#M98247</link>
    <description>Thanks. I am such a fool I passed my macro variable into the macro that contains the described code wrongly (i.e. MV instead of &amp;amp;MV.). Your post helped me solve my problem. Thanks!</description>
    <pubDate>Sat, 14 Oct 2017 07:26:19 GMT</pubDate>
    <dc:creator>csetzkorn</dc:creator>
    <dc:date>2017-10-14T07:26:19Z</dc:date>
    <item>
      <title>dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403889#M98158</link>
      <description>&lt;P&gt;I tend to use a lot of dynamic (explicit) sql in poc sql. Something like this dynamic WHERE CLAUSE works fine :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE TableAlias.ColumnName&amp;nbsp;IN (%bquote('&amp;amp;MacroVariable.'))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However for some reason, this snippet of a SQL query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SELECT &amp;amp;MacroVariableContainingColumnName. FROM ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does not work. I get the error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table does not contain&amp;nbsp;MacroVariableContainingColumnName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the actual content of&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;(e.g. Column1) is not used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to clarify, I want to generate the dynamic SQL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select C1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from something along those lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let MacroVariableContainingColumnName = C1;

using

proc sql;
		connect to TERADATA (OVERRIDE_RESP_LEN=YES SERVER=DBC AUTHDOMAIN="Bla" MODE=TERADATA);
		create table X.Y as
		    Select *
		    from connection to teradata
		    (
				SELECT &amp;amp;MacroVariableContainingColumnName. 
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403889#M98158</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-13T14:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403894#M98160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, there is rarely a use for dynamic SQL, SQL much like most data processing languages assumes you, the user and owner of the data, know your data.&amp;nbsp; If you don't then coding is pointless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, posting a question and stating it does not work does not give us any information at all.&amp;nbsp; By the Post button when starting a new question you will see some guidance for what constitutes a good question, and from most post you will see this re-iterated.&amp;nbsp; Post test data in the form of a datastep in the body of the post using the code window ({i}), show what code you are using, also this code should show and macro's or macro variables used.&amp;nbsp; Also a good idea to show what you want out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the two tiny bits of code you use:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;WHERE&lt;/SPAN&gt; TableAlias&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName &lt;SPAN class="token operator"&gt;IN&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token macroname"&gt;%bquote&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'&amp;amp;MacroVariable.'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why is this not:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;WHERE&lt;/SPAN&gt; TableAlias&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;ColumnName &lt;SPAN class="token operator"&gt;IN&lt;/SPAN&gt; "&lt;SPAN class="token string"&gt;&amp;amp;MacroVariable."&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;And this:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;MacroVariableContainingColumnName&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;FROM&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Seems perfectly fine, but depends on what the macro variable actually contains.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403894#M98160</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-13T12:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403895#M98161</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/99946"&gt;@csetzkorn&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I tend to use a lot of dynamic sql in poc sql. Something like this works fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE TableAlias.ColumnName&amp;nbsp;IN (%bquote('&amp;amp;MacroVariable.'))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However for some reason, this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SELECT &amp;amp;MacroVariableContainingColumnName. FROM ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;does not work. Any ideas?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does not work is rather vague.&amp;nbsp; Is there an error message you would like to share?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403895#M98161</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-10-13T12:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403897#M98163</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let myvar=age;

proc sql;
SELECT &amp;amp;myvar.
FROM sashelp.class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please show a complete example where the problem occur.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403897#M98163</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2017-10-13T12:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403908#M98165</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firstly, there is rarely a use for dynamic SQL, SQL much like most data processing languages assumes you, the user and owner of the data, know your data.&amp;nbsp; If you don't then coding is pointless.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Using macro variables in SQL makes perfect sense to me. Suppose you have to write a system where users can request a specific analysis be performed on whatever columns of the database they want to use? Today they want to analyze columns A, B and C used in the analysis, and tomorrow they can request to analyze columns F,G,S and U. And so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I agree with everyone, the original poster needs to provide his example and code.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403908#M98165</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-10-13T12:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403912#M98166</link>
      <description>&lt;P&gt;&amp;nbsp;Are you sure you didn't get it backwards?&amp;nbsp; The SELECT statement should be fine (except that you refer to a 33-character name for a macro variable).&amp;nbsp; But the IN operator is likely wrong.&amp;nbsp; For a single variable value, you could certainly use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE TableAlias.ColumnName = "&amp;amp;Macrovariable."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if &amp;amp;MACROVARIABLE actually contains more than one value such as NY MA CT, the syntax would be wrong:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE TableAlias.ColumnName IN ('NY MA CT')&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403912#M98166</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-13T12:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403928#M98169</link>
      <description>&lt;P&gt;Sorry, maybe not clear.&amp;nbsp; SQL has no concept of dynamic code, you select the variables from the tables and apply logic.&amp;nbsp; The only variance comes from * which is a bit frowned upon as it shows a lack of knowledge of the data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So forget the SQL part, and focus on the code generation from SAS macro language.&amp;nbsp; I.e. the code generated from that is invalid.&amp;nbsp; Why this is, well likely due to lack of knowledge of the data, true its useful to have people select the columns they want, but those variables need to exist and do what they are supposed to, just slapping any old text in there will not work.&amp;nbsp; It maybe that this comes from a UI where a user selects columns from a list of valid ones, if so then that part is fine, and maybe he just has a delimiter issue within the macro variable - this we cant tell from the "it doesn't work" detailed description.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403928#M98169</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-13T14:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403959#M98179</link>
      <description>Thanks. I really do not get the point of your reply - as others have also eluded to. IN (%bquote('&amp;amp;MacroVariable.')) results IN ('bla') if your macro variable contains bla - your code would not work - i.e. not create the correct result.</description>
      <pubDate>Fri, 13 Oct 2017 14:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403959#M98179</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-13T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403962#M98180</link>
      <description>SQL cannot be dynamic? To use dynamic sql (text) is a common practice - although it can cause sql injection but this is another story. I know the underlying data but in one analysis I want to look at column1 and another at column2 etc. The macro variable contains the 'dynamic' column names ...&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403962#M98180</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-13T14:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403965#M98182</link>
      <description>&lt;P&gt;You keep talking about lack of knowledge of the data, when there are plenty of applications where the exact opposite is true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote an application where the engineers could submit a text file to a specific folder, and the text file contained information about which variables to analyze. NO lack of knowledge of the data here, the engineers provided the application with the exact variables names they wanted to analyze.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And so macro variables in PROC SQL in a SELECT statement is the perfect way to program this.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403965#M98182</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-10-13T14:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403966#M98183</link>
      <description>The IN approach definitely work (-: It produces: WHERE TableAlias.ColumnName IN ('NY MA CT')</description>
      <pubDate>Fri, 13 Oct 2017 14:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/403966#M98183</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-13T14:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404015#M98206</link>
      <description>&lt;P&gt;Yes, IN gives exactly the result you listed.&amp;nbsp; But that's the wrong result.&amp;nbsp; That does NOT give you observations for "NY" or "MA" or "CT".&amp;nbsp; It gives you observations where your variable is 8 characters long, equal to the string "NY MA CT".&amp;nbsp; That result has nothing to do with macro language ... it's the meaning of IN.&amp;nbsp; If you want to compare to three separate possible values, you have to list each of them separately in its own set of quotes:&amp;nbsp; IN ('NY' 'MA' 'CT').&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 16:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404015#M98206</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-13T16:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404035#M98213</link>
      <description>&lt;P&gt;The IN clause is just an example - that's not what the question is about ...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404035#M98213</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-13T17:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404045#M98216</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This message:&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Table does not contain&amp;nbsp;MacroVariableContainingColumnName&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Makes it sound like your have not defined your macro variable.&amp;nbsp; When the SAS macro processor sees what looks like a macro variable reference such as &amp;amp;XX and the macro variable does not exist then it just ignores it and passes the &amp;amp;XX on to SAS do deal with.&amp;nbsp; So in this case it looks like that happened and the result was that your table does not have a variable with that name.&amp;nbsp; Make sure you have defined your macro variable before using it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS names cannot be longer than 32 characters and that name is 33 characters. So that cannot be used for either a macro variable name,&amp;nbsp; a variable name or a dataset member name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you are trying to use the &amp;amp; as a trigger for some type of "dynamic" SQL in passthru code?&amp;nbsp; In that case you should try masking the &amp;amp; so that the SAS macro processor doesn't try to interpret it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
connect to .... as MYDB ;
execute (
.... %nrstr(&amp;amp;something_or_other) ....
) by MYDB;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404045#M98216</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-10-13T17:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic column name in proc sql with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404197#M98247</link>
      <description>Thanks. I am such a fool I passed my macro variable into the macro that contains the described code wrongly (i.e. MV instead of &amp;amp;MV.). Your post helped me solve my problem. Thanks!</description>
      <pubDate>Sat, 14 Oct 2017 07:26:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dynamic-column-name-in-proc-sql-with-macro-variable/m-p/404197#M98247</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-10-14T07:26:19Z</dc:date>
    </item>
  </channel>
</rss>

