<?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: Joining dozens of tables with a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98339#M20764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data final;&lt;/P&gt;&lt;P&gt;set lp_200512 - lp_200600; // ( Specify the Range here )&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// This prog will append all the data sets from lp_200512 to lp_200600..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jun 2013 19:48:14 GMT</pubDate>
    <dc:creator>yeshwanth</dc:creator>
    <dc:date>2013-06-06T19:48:14Z</dc:date>
    <item>
      <title>Joining dozens of tables with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98338#M20763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I am trying to combine a bunch of tables into one based on certain conditions. I am not sure how I would write a macro or do loop for it so I dont have to repeat the union step for each table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far, and would need to do for ~80 tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create table test as select monthend, loan_no, balance, portfolio, DELQIND180 from lp.lp_200512&lt;/P&gt;&lt;P&gt;where DELQIND180 ne "0" and portfolio="CORE" or portfolio="NAT"&lt;/P&gt;&lt;P&gt;union&lt;/P&gt;&lt;P&gt;select monthend, loan_no, balance, portfolio,&amp;nbsp; DELQIND180 from lp.lp_200601&lt;/P&gt;&lt;P&gt;where DELQIND180 ne "0" and portfolio="CORE" or portfolio="NAT"&lt;/P&gt;&lt;P&gt;union&lt;/P&gt;&lt;P&gt;select monthend, loan_no, balance, portfolio,&amp;nbsp; DELQIND180 from lp.lp_200602&lt;/P&gt;&lt;P&gt;where DELQIND180 ne "0" and portfolio="CORE" or portfolio="NAT";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 19:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98338#M20763</guid>
      <dc:creator>Xamius32</dc:creator>
      <dc:date>2013-06-06T19:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Joining dozens of tables with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98339#M20764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data final;&lt;/P&gt;&lt;P&gt;set lp_200512 - lp_200600; // ( Specify the Range here )&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// This prog will append all the data sets from lp_200512 to lp_200600..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 19:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98339#M20764</guid>
      <dc:creator>yeshwanth</dc:creator>
      <dc:date>2013-06-06T19:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Joining dozens of tables with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98340#M20765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to mention, it is by month/year, so its 200512, 200601, 200602...200612, 200701, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 19:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98340#M20765</guid>
      <dc:creator>Xamius32</dc:creator>
      <dc:date>2013-06-06T19:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Joining dozens of tables with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98341#M20766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to combine ALL the data set names that have the right naming pattern, you could use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set ip.ip_20&lt;STRONG&gt;:&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where ...;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The WHERE statement would be applied to all the data sets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 20:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98341#M20766</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-06T20:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Joining dozens of tables with a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98342#M20767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data final;&lt;/P&gt;&lt;P&gt;set lp_200512 -- lp_200712; // ( Specify "--" will append all the data sets which are between 200512 to 200712)&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 20:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-dozens-of-tables-with-a-macro/m-p/98342#M20767</guid>
      <dc:creator>yeshwanth</dc:creator>
      <dc:date>2013-06-06T20:08:53Z</dc:date>
    </item>
  </channel>
</rss>

