<?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: Multiple proc sql tables with same prefix in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555459#M154579</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Is it possible to perform this same procedure using proc sql?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;It's possible by listing out the tables or creating a macro that unions all the tables. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it efficient or practical to do so? Not really.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92272"&gt;@belboy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi SAS Community,&lt;/P&gt;
&lt;P&gt;I'm having a problem trying to combine 20 datasets using proc sql.&amp;nbsp; I can do it in a datastep, but is it possible to do with proc sql?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have_: ;&amp;nbsp; /*all of my datasets begin with have_*/&amp;nbsp; /*For instance, have_01, have_02, have_03....etc */&lt;/P&gt;
&lt;P&gt;if dc_code = "" then total = total +1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to perform this same procedure using proc sql?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2019 19:36:45 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-05-01T19:36:45Z</dc:date>
    <item>
      <title>Multiple proc sql tables with same prefix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555456#M154577</link>
      <description>&lt;P&gt;Hi SAS Community,&lt;/P&gt;&lt;P&gt;I'm having a problem trying to combine 20 datasets using proc sql.&amp;nbsp; I can do it in a datastep, but is it possible to do with proc sql?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have_: ;&amp;nbsp; /*all of my datasets begin with have_*/&amp;nbsp; /*For instance, have_01, have_02, have_03....etc */&lt;/P&gt;&lt;P&gt;if dc_code = "" then total = total +1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to perform this same procedure using proc sql?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555456#M154577</guid>
      <dc:creator>belboy</dc:creator>
      <dc:date>2019-05-01T19:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple proc sql tables with same prefix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555457#M154578</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to perform this same procedure using proc sql?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No because Proc sql &lt;U&gt;&lt;STRONG&gt;doesn't&lt;/STRONG&gt;&lt;/U&gt; support variable/dataset name lists. You could perhaps generate sql union operator statements in a macro or using call execute reading dictionary tables, but that's rather tedious.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555457#M154578</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-05-01T19:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple proc sql tables with same prefix</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555459#M154579</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Is it possible to perform this same procedure using proc sql?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;It's possible by listing out the tables or creating a macro that unions all the tables. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it efficient or practical to do so? Not really.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92272"&gt;@belboy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi SAS Community,&lt;/P&gt;
&lt;P&gt;I'm having a problem trying to combine 20 datasets using proc sql.&amp;nbsp; I can do it in a datastep, but is it possible to do with proc sql?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have_: ;&amp;nbsp; /*all of my datasets begin with have_*/&amp;nbsp; /*For instance, have_01, have_02, have_03....etc */&lt;/P&gt;
&lt;P&gt;if dc_code = "" then total = total +1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to perform this same procedure using proc sql?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-proc-sql-tables-with-same-prefix/m-p/555459#M154579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-01T19:36:45Z</dc:date>
    </item>
  </channel>
</rss>

