<?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 Combining tables horizontally ,vertically using Proc SQL in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4635#M1877</link>
    <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
How can we combine two data sets horizontally, vertically using Proc sql.&lt;BR /&gt;
&lt;BR /&gt;
Please suggest in this regard.&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
rupa</description>
    <pubDate>Mon, 10 Sep 2007 14:25:15 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-09-10T14:25:15Z</dc:date>
    <item>
      <title>Combining tables horizontally ,vertically using Proc SQL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4635#M1877</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
How can we combine two data sets horizontally, vertically using Proc sql.&lt;BR /&gt;
&lt;BR /&gt;
Please suggest in this regard.&lt;BR /&gt;
&lt;BR /&gt;
regards&lt;BR /&gt;
rupa</description>
      <pubDate>Mon, 10 Sep 2007 14:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4635#M1877</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-10T14:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Combining tables horizontally ,vertically using Proc SQL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4636#M1878</link>
      <description>Are you trying to create a pivot table as in Excel? If so, use SQL to summarise your data then you would need to use Proc Transpose to create the pivot.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
	create table  &lt;I&gt;summary_data&lt;/I&gt; as&lt;BR /&gt;
		select count(outcome) as YTD_count, outcome, issue&lt;BR /&gt;
		from  &lt;I&gt;raw_data&lt;/I&gt;&lt;BR /&gt;
		group by outcome, issue&lt;BR /&gt;
		order by issue, outcome;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
/*Turn the summary into a pivot table summary */&lt;BR /&gt;
&lt;BR /&gt;
proc transpose data= &lt;I&gt;summary_data&lt;/I&gt; out= &lt;I&gt;pivot_data&lt;/I&gt; prefix=YTD_;&lt;BR /&gt;
   by issue ;&lt;BR /&gt;
   id outcome;&lt;BR /&gt;
   var YTD_count;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 18 Sep 2007 16:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4636#M1878</guid>
      <dc:creator>Scooby_Drew</dc:creator>
      <dc:date>2007-09-18T16:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Combining tables horizontally ,vertically using Proc SQL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4637#M1879</link>
      <description>Horizontally:&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table horizontal as&lt;BR /&gt;
select a.*,b.*&lt;BR /&gt;
from one a, two b&lt;BR /&gt;
where a.key=b.key&lt;BR /&gt;
&lt;BR /&gt;
Vertically;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table vertical as&lt;BR /&gt;
select *&lt;BR /&gt;
from one&lt;BR /&gt;
outer union corr&lt;BR /&gt;
select *&lt;BR /&gt;
from two;</description>
      <pubDate>Tue, 18 Sep 2007 18:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Combining-tables-horizontally-vertically-using-Proc-SQL/m-p/4637#M1879</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2007-09-18T18:51:02Z</dc:date>
    </item>
  </channel>
</rss>

