<?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: How do I match/merge two datasets using a unique combination of two variables? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286282#M59491</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does work. I just needed to exclude missing VAR1 values from the original databases prior to the merge. Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 21:25:13 GMT</pubDate>
    <dc:creator>Kels123</dc:creator>
    <dc:date>2016-07-21T21:25:13Z</dc:date>
    <item>
      <title>How do I match/merge two datasets using a unique combination of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286222#M59479</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to merge two databases. To protect confidentiality, one of the databases had all of it's unique identifiers removed, so there is no single variable that is unique for each subject AND present in both databases that I can use for the merge. HOWEVER, I have found that the&amp;nbsp;combination of two date variables (let's call them VAR1 and VAR2) IS unique for each subject.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any easy way to merge based on these two variables (instead of just using one unique variable which I don't have)? My code is below, but I don't think you can list the two variables this way. I sorted on the two variables first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;sort&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;=clean.INPROGRESS;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;by&lt;/SPAN&gt;&amp;nbsp;VAR1 VAR2;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;sort&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;=clean.ORIGINAL;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;by&lt;/SPAN&gt;&amp;nbsp;VAR1 VAR2;&lt;/P&gt;&lt;P class="p2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; clean.COMBINED;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;merge&lt;/SPAN&gt; clean.INPROGRESS (&lt;SPAN class="s2"&gt;in&lt;/SPAN&gt;=a) clean.ORIGINAL&amp;nbsp;;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;by&lt;/SPAN&gt;&amp;nbsp;VAR1 VAR2;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;if a;&lt;/P&gt;&lt;P class="p5"&gt;run&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p5"&gt;&lt;SPAN class="s3"&gt;Please help! Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 19:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286222#M59479</guid>
      <dc:creator>Kels123</dc:creator>
      <dc:date>2016-07-21T19:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match/merge two datasets using a unique combination of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286253#M59483</link>
      <description>Haven't you tried it prior to posting?&lt;BR /&gt;Doesn't sound correct data wise though to only merge on date variables. Don't you still need some kind of identification of the individuals?</description>
      <pubDate>Thu, 21 Jul 2016 20:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286253#M59483</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-07-21T20:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match/merge two datasets using a unique combination of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286254#M59484</link>
      <description>&lt;P&gt;Run it. It should work assuming your analysis of the unique nature of the paired variables is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BY processing can use a considerable number of variables. The number doesn't change the basic behavior.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 20:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286254#M59484</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-21T20:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I match/merge two datasets using a unique combination of two variables?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286282#M59491</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does work. I just needed to exclude missing VAR1 values from the original databases prior to the merge. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-match-merge-two-datasets-using-a-unique-combination-of/m-p/286282#M59491</guid>
      <dc:creator>Kels123</dc:creator>
      <dc:date>2016-07-21T21:25:13Z</dc:date>
    </item>
  </channel>
</rss>

