<?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: SQL merge 2 data fully in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402027#M97588</link>
    <description>&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;nice trick.&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;</description>
    <pubDate>Sat, 07 Oct 2017 01:43:50 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-10-07T01:43:50Z</dc:date>
    <item>
      <title>SQL merge 2 data fully</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402021#M97586</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I remember that there is a quick way to do SQL to accomplish the merge 2 datasets as I did below.&lt;/P&gt;
&lt;P&gt;I just cant figure out what is the syntax, basically, I dont need to use the variable x=1;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input   number;
datalines;
1
3
102
;run;

data b;
input  name1 :$5. ;
datalines;
new1
new2
;run;

data a; set a; x=1; run;
data b; set b; x=1; run;

proc sql;
create table want (drop=x)as select * from a join b
on a.x=b.x;quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Oct 2017 01:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402021#M97586</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-10-07T01:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL merge 2 data fully</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402022#M97587</link>
      <description>&lt;P&gt;Change the "ON" expression to any tautology:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input   number;
datalines;
1
3
102
;run;

data b;
input  name1 :$5. ;
datalines;
new1
new2
;run;

proc sql;
  create table want as select * from a join b on 1=1;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact&amp;nbsp; you could say&amp;nbsp;&amp;nbsp; "ON 0=0"&amp;nbsp;&amp;nbsp;&amp;nbsp; or&amp;nbsp;&amp;nbsp; "ON 1&amp;gt;0".&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 01:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402022#M97587</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-10-07T01:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: SQL merge 2 data fully</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402027#M97588</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;nice trick.&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 01:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402027#M97588</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-10-07T01:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: SQL merge 2 data fully</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402028#M97589</link>
      <description>&lt;P&gt;Are you just looking for this?&amp;nbsp; Just create data sets A and B, and don't create X:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table want as select * from a, b;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 01:44:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402028#M97589</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-07T01:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: SQL merge 2 data fully</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402137#M97625</link>
      <description>&lt;P&gt;YES, it is what I am looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;from a, b;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;HC&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 02:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-merge-2-data-fully/m-p/402137#M97625</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-10-08T02:34:08Z</dc:date>
    </item>
  </channel>
</rss>

