<?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: how to creat macro variable in proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442432#M282737</link>
    <description>&lt;P&gt;It will really help if you provide some example data, the result of your existing query would be fine, and indicate what you want to go into which macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It isn't very clear what you mean by "only one raw of the variable counttime". Do you want the first, last, something else? Since there is going to be one value of counttime for each level combination of interternal_visit_id and earliest_visit_date we need to know which one you want.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Mar 2018 17:17:08 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-03-05T17:17:08Z</dc:date>
    <item>
      <title>how to creat macro variable in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442426#M282735</link>
      <description>&lt;P&gt;I have this code in proc sql&amp;nbsp; and I want to create a macro variable for only one raw of the variable counttime&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw some methods to create macro variable for all the variables that selected but I don't know how to do it for only a variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;select internal_visit_id, Earliest_Visit_Date, count (distinct internal_visit_id) as counttime&lt;BR /&gt;from &amp;amp;visit.1&lt;BR /&gt;where Earliest_Visit_Date ne .;&lt;BR /&gt;quit; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 17:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442426#M282735</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-05T17:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to creat macro variable in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442431#M282736</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select count (distinct internal_visit_id) into :counttime
from &amp;amp;visit.1
where Earliest_Visit_Date ne .;
quit; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Mar 2018 17:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442431#M282736</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-05T17:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to creat macro variable in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442432#M282737</link>
      <description>&lt;P&gt;It will really help if you provide some example data, the result of your existing query would be fine, and indicate what you want to go into which macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It isn't very clear what you mean by "only one raw of the variable counttime". Do you want the first, last, something else? Since there is going to be one value of counttime for each level combination of interternal_visit_id and earliest_visit_date we need to know which one you want.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 17:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442432#M282737</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-05T17:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to creat macro variable in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442454#M282738</link>
      <description>&lt;P&gt;you haven't helped me with what to do with the other variables that I have to select but without creating macros for them&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 18:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442454#M282738</guid>
      <dc:creator>mona4u</dc:creator>
      <dc:date>2018-03-05T18:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to creat macro variable in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442459#M282739</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134228"&gt;@mona4u&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;you haven't helped me with what to do with the other variables that I have to select but without creating macros for them&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Those variables are not needed at all for the creation of the single macrovar. They only get in the way.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 18:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-creat-macro-variable-in-proc-sql/m-p/442459#M282739</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-05T18:20:54Z</dc:date>
    </item>
  </channel>
</rss>

