<?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 using a macro variable for label name in a table. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-using-a-macro-variable-for-label-name-in-a-table/m-p/268421#M18590</link>
    <description>&lt;P&gt;The macro variable names assigned to the date prompt or the the date range prompt will be listed in the log. &amp;nbsp;Field1 is read via the from statement, field1 can assigned a new name with a date suffix. &amp;nbsp; &amp;nbsp;Field1 as field1_&amp;amp;FromDate. &amp;nbsp;The contents of the macro variable &amp;amp;FromDate will be appended to the string field1 &amp;nbsp;--- creating the field name "field1_ 2014 (from your example). Hope this is the question you were asking&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &amp;nbsp;Date prompt string is 9 characters, &amp;nbsp;ddmmmyyyy -- 05MAY2016&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 01:47:22 GMT</pubDate>
    <dc:creator>thorneton</dc:creator>
    <dc:date>2016-05-05T01:47:22Z</dc:date>
    <item>
      <title>PROC SQL using a macro variable for label name in a table.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-using-a-macro-variable-for-label-name-in-a-table/m-p/268390#M18587</link>
      <description>&lt;P&gt;I'm trying to name my labels in a table that I created what was entered as a prompt.&amp;nbsp; I'm prompting for a date range (FromDate ToDate).&amp;nbsp; Then within my code I'm using these variables to grab the information.&amp;nbsp; When I create my table I want to use the FromDate and ToDate to label the fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Prompt field: FromDate as a value of 2014&lt;/P&gt;
&lt;P&gt;Prompt field: ToDate as a value of 2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;/P&gt;
&lt;P&gt;CREATE TABLE MyTable AS&lt;/P&gt;
&lt;P&gt;Select field1 as field1_2014, field2 as field2_2014, field3 as field3_2014&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; , field3 as field4_2015, field5 as field5_2015, field6 as field6_2015&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible?&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 21:52:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-using-a-macro-variable-for-label-name-in-a-table/m-p/268390#M18587</guid>
      <dc:creator>LisaSAS</dc:creator>
      <dc:date>2016-05-04T21:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL using a macro variable for label name in a table.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-using-a-macro-variable-for-label-name-in-a-table/m-p/268421#M18590</link>
      <description>&lt;P&gt;The macro variable names assigned to the date prompt or the the date range prompt will be listed in the log. &amp;nbsp;Field1 is read via the from statement, field1 can assigned a new name with a date suffix. &amp;nbsp; &amp;nbsp;Field1 as field1_&amp;amp;FromDate. &amp;nbsp;The contents of the macro variable &amp;amp;FromDate will be appended to the string field1 &amp;nbsp;--- creating the field name "field1_ 2014 (from your example). Hope this is the question you were asking&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &amp;nbsp;Date prompt string is 9 characters, &amp;nbsp;ddmmmyyyy -- 05MAY2016&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 01:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/PROC-SQL-using-a-macro-variable-for-label-name-in-a-table/m-p/268421#M18590</guid>
      <dc:creator>thorneton</dc:creator>
      <dc:date>2016-05-05T01:47:22Z</dc:date>
    </item>
  </channel>
</rss>

