<?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: combining multiple datasets using proc sql; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953403#M372480</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    merge abstractor:;
    by population shtmeasure service;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This assumes all data sets are sorted by POPULATION SHTMEASURE SERVICE&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2024 15:56:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-12-12T15:56:15Z</dc:date>
    <item>
      <title>combining multiple datasets using proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953401#M372479</link>
      <description>&lt;P&gt;This is what I am currently doing.&amp;nbsp; Everytime there is another abstractor data set I have to add to the statement.&amp;nbsp; I want to be able to run the code with out having to manually add.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table sasfile.rh_interface_byabst_&amp;amp;filedate. as&lt;BR /&gt;select a.population,&lt;BR /&gt;a.shtmeasure,&lt;BR /&gt;a.service,&lt;BR /&gt;a.caregaps_total,&lt;BR /&gt;a.overreads_total,&lt;BR /&gt;b.g1,&lt;BR /&gt;b.o1,&lt;BR /&gt;c.g2,&lt;BR /&gt;c.o2,&lt;BR /&gt;d.g3,&lt;BR /&gt;d.o3,&lt;BR /&gt;e.g4,&lt;BR /&gt;e.o4,&lt;BR /&gt;f.g5,&lt;BR /&gt;f.o5,&lt;BR /&gt;g.g6,&lt;BR /&gt;g.o6,&lt;BR /&gt;h.g7,&lt;BR /&gt;h.o7,&lt;BR /&gt;i.g8,&lt;BR /&gt;i.o8,&lt;BR /&gt;j.g9,&lt;BR /&gt;j.o9,&lt;BR /&gt;k.g10,&lt;BR /&gt;k.o10,&lt;BR /&gt;l.g11,&lt;BR /&gt;l.o11&lt;BR /&gt;from sasfile.rh_interface_bymeasure_&amp;amp;filedate. as a&lt;BR /&gt;left join abstractor1 as b&lt;BR /&gt;on a.population=b.population and&lt;BR /&gt;a.shtmeasure=b.shtmeasure and&lt;BR /&gt;a.service=b.service&lt;BR /&gt;left join abstractor2 as c&lt;BR /&gt;on a.population=c.population and&lt;BR /&gt;a.shtmeasure=c.shtmeasure and&lt;BR /&gt;a.service=c.service&lt;BR /&gt;left join abstractor3 as d&lt;BR /&gt;on a.population=d.population and&lt;BR /&gt;a.shtmeasure=d.shtmeasure and&lt;BR /&gt;a.service=d.service&lt;BR /&gt;left join abstractor4 as e&lt;BR /&gt;on a.population=e.population and&lt;BR /&gt;a.shtmeasure=e.shtmeasure and&lt;BR /&gt;a.service=e.service&lt;BR /&gt;left join abstractor5 as f&lt;BR /&gt;on a.population=f.population and&lt;BR /&gt;a.shtmeasure=f.shtmeasure and&lt;BR /&gt;a.service=f.service&lt;BR /&gt;left join abstractor6 as g&lt;BR /&gt;on a.population=g.population and&lt;BR /&gt;a.shtmeasure=g.shtmeasure and&lt;BR /&gt;a.service=g.service&lt;BR /&gt;left join abstractor7 as h&lt;BR /&gt;on a.population=h.population and&lt;BR /&gt;a.shtmeasure=h.shtmeasure and&lt;BR /&gt;a.service=h.service&lt;BR /&gt;left join abstractor8 as i&lt;BR /&gt;on a.population=i.population and&lt;BR /&gt;a.shtmeasure=i.shtmeasure and&lt;BR /&gt;a.service=i.service&lt;BR /&gt;left join abstractor9 as j&lt;BR /&gt;on a.population=j.population and&lt;BR /&gt;a.shtmeasure=j.shtmeasure and&lt;BR /&gt;a.service=j.service&lt;BR /&gt;left join abstractor10 as k&lt;BR /&gt;on a.population=k.population and&lt;BR /&gt;a.shtmeasure=k.shtmeasure and&lt;BR /&gt;a.service=k.service&lt;BR /&gt;left join abstractor11 as l&lt;BR /&gt;on a.population=l.population and&lt;BR /&gt;a.shtmeasure=l.shtmeasure and&lt;BR /&gt;a.service=l.service&lt;BR /&gt;;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 15:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953401#M372479</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-12-12T15:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: combining multiple datasets using proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953403#M372480</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    merge abstractor:;
    by population shtmeasure service;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This assumes all data sets are sorted by POPULATION SHTMEASURE SERVICE&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 15:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953403#M372480</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-12-12T15:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: combining multiple datasets using proc sql;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953404#M372481</link>
      <description>&lt;P&gt;wow... that is easy!!&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 16:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/combining-multiple-datasets-using-proc-sql/m-p/953404#M372481</guid>
      <dc:creator>tgleghorn</dc:creator>
      <dc:date>2024-12-12T16:02:08Z</dc:date>
    </item>
  </channel>
</rss>

