<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472566#M121183</link>
    <description>&lt;P&gt;Paste from the LOG the code and messages. Best is to paste into code box opened using the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any error came from something else than the "more than one data set with repeats of by values". That is note because the result is often not what you might intend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A brief example follows of repeats of by values. Look at the two data sets and then think about what you might be thinking of how the merge should work. Then run the code and examine the output to see if matches your expectations.&lt;/P&gt;
&lt;PRE&gt;data work.one;
   input id value  ;
datalines;
1 3
1 4
1 5
;

data work.two;
   input id value2;
datalines;
1 8
1 6
1 2
1 1
;


data work.error;
   merge work.one work.two;
   by id;
run;&lt;/PRE&gt;</description>
    <pubDate>Fri, 22 Jun 2018 18:53:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-06-22T18:53:38Z</dc:date>
    <item>
      <title>MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472549#M121178</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;i am having problem verifying if the date i merged is right. This is what i did&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data LAB;&lt;/P&gt;&lt;P&gt;input visit_dt date mmddyy10. Bdate date mmddyy10. Test&amp;nbsp; testresult $;&lt;/P&gt;&lt;P&gt;format date mmddyy10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;03/13/2018&amp;nbsp; 02/27/1931&amp;nbsp; 1&amp;nbsp; N&lt;/P&gt;&lt;P&gt;02/26/2018 10/21/1944&amp;nbsp; 10&amp;nbsp; P&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;01/26/2018&amp;nbsp; 04/14/1949&amp;nbsp;&amp;nbsp; 1&amp;nbsp; N&lt;/P&gt;&lt;P&gt;02/06/2018&amp;nbsp; 04/14/1949&amp;nbsp; 1&amp;nbsp; P&lt;/P&gt;&lt;P&gt;; RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data CLINIC;&lt;/P&gt;&lt;P&gt;input visit_dt Bdate date clinic $ diag;&lt;/P&gt;&lt;P&gt;format date mmddyy10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;03/13/2018&amp;nbsp; 02/27/1931&amp;nbsp; mmc 200&lt;/P&gt;&lt;P&gt;01/19/2018 10/06/1934&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc &amp;nbsp;300&lt;/P&gt;&lt;P&gt;01/26/2018&amp;nbsp; 04/14/1949&amp;nbsp;&amp;nbsp; mmc 200&lt;/P&gt;&lt;P&gt;02/06/2018&amp;nbsp; 04/14/1949&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data above is just an example. I have 1704 records in lab data set and 1109 records in clinic datatset. I need to have 1704 records after it is merged because that is number of tests done.&amp;nbsp; I tired sorting by visit_dt and merged, the note says ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MERGE statement has more than one data set with repeats of by values. The SAS system stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 17:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472549#M121178</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2018-06-22T17:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472559#M121182</link>
      <description>&lt;P&gt;Your data steps with example data are not correct (too many variables in the input statement, and missing informats). Test them and take care of the errors.&lt;/P&gt;
&lt;P&gt;Also show the merge code.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 18:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472559#M121182</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-22T18:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472566#M121183</link>
      <description>&lt;P&gt;Paste from the LOG the code and messages. Best is to paste into code box opened using the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any error came from something else than the "more than one data set with repeats of by values". That is note because the result is often not what you might intend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A brief example follows of repeats of by values. Look at the two data sets and then think about what you might be thinking of how the merge should work. Then run the code and examine the output to see if matches your expectations.&lt;/P&gt;
&lt;PRE&gt;data work.one;
   input id value  ;
datalines;
1 3
1 4
1 5
;

data work.two;
   input id value2;
datalines;
1 8
1 6
1 2
1 1
;


data work.error;
   merge work.one work.two;
   by id;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jun 2018 18:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472566#M121183</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-22T18:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472574#M121186</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;than you for your response. I did it again&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; LAB;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN&gt; @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;12&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; Bdate &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN&gt; @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;22&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; Test $ @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;24&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; testresult $;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN&gt; Bdate &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN&gt;;&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;13mar2018 27feb1931 gc n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;26feb2018 21oct1944 gc n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;13feb2018 06mar1948 gc p&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;13feb2018 06mar1948 gc n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;26jan2018 14apr1949 gc p&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;02feb2018 14apr1949 gc n&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;RUN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;print&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=lab;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;sort&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=lab;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt bdate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; CLINIC;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN&gt; @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;12&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; Bdate &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN&gt; @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;22&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; clinic $ diag @&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;26&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN&gt; Bdate &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt &lt;/SPAN&gt;&lt;SPAN style="color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN&gt;;&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;13mar2018 27feb1931 mmc 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;19jan2018 06oct1934 mmc 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;26feb2018 21oct1944 mmc 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;26jan2018 03jun1978 mmc 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;13feb2018 06mar1948 mmc 200&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;26jan2018 14apr1949 mmc 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;02feb2018 14apr1949 mmc 300&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;RUN&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;print&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=clinic;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;sort&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=clinic;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt bdate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; labcli;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;merge&lt;/SPAN&gt;&lt;SPAN&gt; lab clinic;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN&gt; visit_dt bdate;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;it wirked perfectly here but in real datasets I am not sure if it merged correctly because when I did frequency analysis for test the result was not accurate and te log says; merge statement has multiple repeat values in by variable etc....Please help:(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 19:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472574#M121186</guid>
      <dc:creator>DhanaMalla</dc:creator>
      <dc:date>2018-06-22T19:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472589#M121189</link>
      <description>&lt;P&gt;Just looking at the data, no computers ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you know how the observations are supposed to match up?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first data set contains:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your second data set contains:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc &amp;nbsp;300&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are we to assume that these match (first row with first row, second row with second row)?&amp;nbsp; How do we know whether that match should be reversed (first row with second row, second row with first row)?&amp;nbsp; In this case, you have two identical rows so the outcome would be the same either way.&amp;nbsp; But your data set doesn't contain a reliable way to match the data when both data sets have multiple rows for the same combination of dates.&amp;nbsp; The situation only gets worse if you have two rows in one data set, and three possible matches in the other data set.&amp;nbsp; (You did mention that your data sets don't contain the same number of observations.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's what SAS's message is trying to warn you about.&amp;nbsp; But regardless of whether SAS warns you, how can you reliably match the two data sets?&amp;nbsp; Should there be another variable such as a PatientID?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 20:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472589#M121189</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-22T20:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472677#M121225</link>
      <description>&lt;P&gt;In a large data base, you will unvariably have events where people with identical birthdates will visit on the same day (eg think about twins).&lt;/P&gt;
&lt;P&gt;You need to deal with that. It might be that you need a unique key for a visit that is also communicated to the lab.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jun 2018 06:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/472677#M121225</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-23T06:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473061#M121345</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FROM THIS :&lt;/P&gt;&lt;P&gt;First data set contents;&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second data set contains:&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc &amp;nbsp;300&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THIS IS WHAT I WANT&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N mmc&amp;nbsp; 300&lt;/P&gt;&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N mmc &amp;nbsp;300&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 16:15:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473061#M121345</guid>
      <dc:creator>DhanaMalla</dc:creator>
      <dc:date>2018-06-25T16:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473064#M121346</link>
      <description>&lt;P&gt;For the case you posted, that's a perfectly fine solution.&amp;nbsp; How about this case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First data set contents;&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; 1&amp;nbsp;&amp;nbsp; N&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp; P&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second data set contains:&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc&amp;nbsp; 300&lt;/P&gt;
&lt;P&gt;02/13/2018&amp;nbsp; 03/06/1978&amp;nbsp; mmc&amp;nbsp;&amp;nbsp;200&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What should the result be?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 16:28:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473064#M121346</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-25T16:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: MERGING</title>
      <link>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473066#M121347</link>
      <description>&lt;P&gt;As I mentioned earlier, these two data sets (lab and clinic) have two common variables and they are repeated in both datasets. Same individual may have several test at the same date and result of different can be different. And on the same date many individual get tested. All I want to know is number and&amp;nbsp;type of tests done and their results.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 17:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/MERGING/m-p/473066#M121347</guid>
      <dc:creator>DhanaMalla</dc:creator>
      <dc:date>2018-06-25T17:00:21Z</dc:date>
    </item>
  </channel>
</rss>

