<?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: Merging datasets without a unique identifier in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297465#M270299</link>
    <description>&lt;P&gt;What you describe is the cartesian product of the two datasets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table dataset3 as&lt;/P&gt;
&lt;P&gt;select&amp;nbsp;&lt;SPAN&gt;dataset1.*,&amp;nbsp;dataset2.*&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;from dataset1 cross join dataset2;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 17:47:18 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-09-09T17:47:18Z</dc:date>
    <item>
      <title>Merging datasets without a unique identifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297462#M270298</link>
      <description>&lt;P&gt;Is there a way to merge two datasets that do not have a unique identifier:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dataset 1 has:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID &amp;nbsp; &amp;nbsp;Name &amp;nbsp; &amp;nbsp; Color&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; Bob &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Red&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; Jane &amp;nbsp; &amp;nbsp; &amp;nbsp; Blue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Dataset 2 has:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Food &amp;nbsp; &amp;nbsp;Drink&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Pasta &amp;nbsp; Soda&lt;/P&gt;&lt;P&gt;Pizza &amp;nbsp; Water&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that when you merge the two it would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID &amp;nbsp; &amp;nbsp;Name &amp;nbsp; &amp;nbsp; Color &amp;nbsp; &amp;nbsp;Food &amp;nbsp; &amp;nbsp;Drink&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; Bob &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Red &amp;nbsp; &amp;nbsp; &amp;nbsp;Pasta &amp;nbsp; Soda&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;Bob&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Red &amp;nbsp; &amp;nbsp; &amp;nbsp;Pizza &amp;nbsp; &amp;nbsp;Water&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp; Jane &amp;nbsp; &amp;nbsp; &amp;nbsp; Blue&amp;nbsp; &amp;nbsp; &amp;nbsp; Pasta &amp;nbsp; Soda&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp; Jane &amp;nbsp; &amp;nbsp; &amp;nbsp; Blue &amp;nbsp; &amp;nbsp; &amp;nbsp;Pizza &amp;nbsp; &amp;nbsp;Water&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;A simple statement like below does not work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Data one; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;merge color food;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 17:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297462#M270298</guid>
      <dc:creator>einstein</dc:creator>
      <dc:date>2016-09-09T17:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merging datasets without a unique identifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297465#M270299</link>
      <description>&lt;P&gt;What you describe is the cartesian product of the two datasets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table dataset3 as&lt;/P&gt;
&lt;P&gt;select&amp;nbsp;&lt;SPAN&gt;dataset1.*,&amp;nbsp;dataset2.*&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;from dataset1 cross join dataset2;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 17:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297465#M270299</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-09-09T17:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Merging datasets without a unique identifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297466#M270300</link>
      <description>&lt;P&gt;This worked beautifully!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 17:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merging-datasets-without-a-unique-identifier/m-p/297466#M270300</guid>
      <dc:creator>einstein</dc:creator>
      <dc:date>2016-09-09T17:50:59Z</dc:date>
    </item>
  </channel>
</rss>

