<?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: Aggregates data base in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251718#M17762</link>
    <description>&lt;P&gt;Could you set the month into a macro variable, and then use something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;select&lt;BR /&gt;MRC_PRE_&amp;amp;MTH. as PRE_MRC,&lt;BR /&gt;MRC_POST_&amp;amp;MTH. as Post_MRC,&lt;BR /&gt;from_pp_&amp;amp;MTH. as pp_from,&lt;BR /&gt;to_pp_&amp;amp;MTH. as pp_to,&lt;BR /&gt;change&amp;amp;MTH. as changes&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2016 04:05:45 GMT</pubDate>
    <dc:creator>TomKari</dc:creator>
    <dc:date>2016-02-23T04:05:45Z</dc:date>
    <item>
      <title>Aggregates data base</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251645#M17760</link>
      <description>&lt;P&gt;Hi, my database need modify&amp;nbsp;existing&amp;nbsp;variables in the Case When syntax for EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I cannot create enough room for condition my new variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, I can use sas base&lt;/P&gt;&lt;P&gt;data final;&lt;BR /&gt;set work.QUERY_FOR_JAN2016_SAS7BDAT1_0003;&lt;BR /&gt;if whichone = 'januaryppc' then do;&lt;BR /&gt;PRE_MRC = MRC_PRE_JAN;&lt;BR /&gt;Post_MRC = MRC_POST_JAN;&lt;BR /&gt;pp_from = from_pp_JAN;&lt;BR /&gt;pp_to = to_pp_JAN;&lt;BR /&gt;changes = changejan;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but for EG, I really cannot do that for column changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway SQL can do multiple column change in a macro statement maybe?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251645#M17760</guid>
      <dc:creator>bohonghong</dc:creator>
      <dc:date>2016-02-22T21:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregates data base</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251649#M17761</link>
      <description>&lt;P&gt;In SQL, either query builder or code, you need a case statement for EACH variable change you want to make.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 21:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251649#M17761</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-22T21:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregates data base</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251718#M17762</link>
      <description>&lt;P&gt;Could you set the month into a macro variable, and then use something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;select&lt;BR /&gt;MRC_PRE_&amp;amp;MTH. as PRE_MRC,&lt;BR /&gt;MRC_POST_&amp;amp;MTH. as Post_MRC,&lt;BR /&gt;from_pp_&amp;amp;MTH. as pp_from,&lt;BR /&gt;to_pp_&amp;amp;MTH. as pp_to,&lt;BR /&gt;change&amp;amp;MTH. as changes&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 04:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251718#M17762</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2016-02-23T04:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregates data base</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251749#M17764</link>
      <description>&lt;P&gt;This is a typical case where data step logic is more efficient than SQL, at least from a coding/maintenance point of view.&lt;/P&gt;
&lt;P&gt;So if you already have a data step, use that in EG. And then use SQL/Query Builder for other steps.&lt;/P&gt;
&lt;P&gt;And you could perhaps use a macro&amp;nbsp;here, but I can't see the benefit. The code/task will be less readable, and harder to maintain.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 11:25:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Aggregates-data-base/m-p/251749#M17764</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-23T11:25:24Z</dc:date>
    </item>
  </channel>
</rss>

