<?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: FULL JOIN in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37057#M9396</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
What if you replace your 'full outer join' by a 'cross join' ?&lt;BR /&gt;
&lt;BR /&gt;
It gives the following query:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE TEST AS&lt;BR /&gt;
SELECT A.DATE,A.DAY,A.HANDLED,A.LEVEL1DESC, P.UCL,P.LCL&lt;BR /&gt;
FROM MEAN1 A CROSS JOIN DAILY_MEAN P&lt;BR /&gt;
ON A.LEVEL1DESC = P.LEVEL1DESC AND A.DAY = P.DAY&lt;BR /&gt;
&lt;BR /&gt;
ORDER BY A.LEVEL1DESC, A.DATE;&lt;BR /&gt;
QUIT; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Florent</description>
    <pubDate>Tue, 23 Nov 2010 11:50:18 GMT</pubDate>
    <dc:creator>Florent</dc:creator>
    <dc:date>2010-11-23T11:50:18Z</dc:date>
    <item>
      <title>FULL JOIN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37056#M9395</link>
      <description>Hello everyone!&lt;BR /&gt;
&lt;BR /&gt;
What do i need to do to get it to return the results from B in every row not just the first for each?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE TEST AS&lt;BR /&gt;
SELECT A.DATE,A.DAY,A.HANDLED,A.LEVEL1DESC, P.UCL,P.LCL&lt;BR /&gt;
FROM MEAN1 A FULL OUTER JOIN DAILY_MEAN P&lt;BR /&gt;
ON A.LEVEL1DESC = P.LEVEL1DESC AND A.DAY = P.DAY&lt;BR /&gt;
&lt;BR /&gt;
ORDER BY A.LEVEL1DESC, A.DATE;&lt;BR /&gt;
QUIT; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
fred&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: fredbell

Message was edited by: fredbell</description>
      <pubDate>Fri, 19 Nov 2010 15:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37056#M9395</guid>
      <dc:creator>fredbell</dc:creator>
      <dc:date>2010-11-19T15:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: FULL JOIN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37057#M9396</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
What if you replace your 'full outer join' by a 'cross join' ?&lt;BR /&gt;
&lt;BR /&gt;
It gives the following query:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE TEST AS&lt;BR /&gt;
SELECT A.DATE,A.DAY,A.HANDLED,A.LEVEL1DESC, P.UCL,P.LCL&lt;BR /&gt;
FROM MEAN1 A CROSS JOIN DAILY_MEAN P&lt;BR /&gt;
ON A.LEVEL1DESC = P.LEVEL1DESC AND A.DAY = P.DAY&lt;BR /&gt;
&lt;BR /&gt;
ORDER BY A.LEVEL1DESC, A.DATE;&lt;BR /&gt;
QUIT; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Florent</description>
      <pubDate>Tue, 23 Nov 2010 11:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37057#M9396</guid>
      <dc:creator>Florent</dc:creator>
      <dc:date>2010-11-23T11:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: FULL JOIN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37058#M9397</link>
      <description>do you mean something like this where you have a big table and a "look-up" table witha single row and want to put the data from the single row table on the big table?&lt;BR /&gt;
&lt;BR /&gt;
See the below example for using the SASHELP table SHOES which comes in every SAS installation&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table average_sales as&lt;BR /&gt;
    select mean(sales) as avg_sales format=dollar12.&lt;BR /&gt;
	from sashelp.shoes;&lt;BR /&gt;
&lt;BR /&gt;
  create table shoes_with_avg_sales as&lt;BR /&gt;
    select S.*, a.avg_sales&lt;BR /&gt;
	from sashelp.shoes S cross join average_sales a&lt;BR /&gt;
	;&lt;BR /&gt;
quit;</description>
      <pubDate>Tue, 23 Nov 2010 13:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37058#M9397</guid>
      <dc:creator>darrylovia</dc:creator>
      <dc:date>2010-11-23T13:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: FULL JOIN</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37059#M9398</link>
      <description>Thanks for the input people, it turns out that it was because the day was a number type.&lt;BR /&gt;
&lt;BR /&gt;
I was instructed to use the put(day) to transform it back to a text,&lt;BR /&gt;
&lt;BR /&gt;
From text to sas data format then back to text, what a pain in the PUT.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Fred</description>
      <pubDate>Tue, 23 Nov 2010 23:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/FULL-JOIN/m-p/37059#M9398</guid>
      <dc:creator>fredbell</dc:creator>
      <dc:date>2010-11-23T23:29:25Z</dc:date>
    </item>
  </channel>
</rss>

