<?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: Help with merge in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696008#M25225</link>
    <description>&lt;P&gt;I am trying to merge Data1 with Data2. Data1 has a bunch of variables, including claim_numb. Data2 has only two variables, Date_Begin_Service_Header and claim_numb. I am trying to merge the two tables so I have Data3, which has all the claim_numb from Data1 matched with the&amp;nbsp;Date_Begin_Service_Header variable from Data2. But when I merge, the Date_Begin_Service_Header variable is blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Nov 2020 18:07:20 GMT</pubDate>
    <dc:creator>marleeakerson</dc:creator>
    <dc:date>2020-11-02T18:07:20Z</dc:date>
    <item>
      <title>Help with merge</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696003#M25223</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to merge two data sets based on claim_numb, but when I do, the Date_Begin_Service_Header variable ends up blank, even though it is completely filled out in data2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=data1;
by Claim_Numb;
run;

data data2;
set 
file1(keep=Date_Begin_Service_Header claim_numb)
file2 (keep=Date_Begin_Service_Header claim_numb);
run;&lt;BR /&gt;
proc sort data=data2;
by Claim_Numb;
run;

data data3;
		merge data1 (in=a) data2 (in=b)  ;
		by Claim_Numb;
		if a;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Nov 2020 17:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696003#M25223</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-11-02T17:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merge</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696005#M25224</link>
      <description>You only keep records that are in A, which is Data1 via the IF statement.&lt;BR /&gt;But you say the data is filled out in Data2 not Data1?  Should it be the opposite? &lt;BR /&gt;&lt;BR /&gt;Without data, I can only guess....&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Nov 2020 17:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696005#M25224</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-02T17:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merge</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696008#M25225</link>
      <description>&lt;P&gt;I am trying to merge Data1 with Data2. Data1 has a bunch of variables, including claim_numb. Data2 has only two variables, Date_Begin_Service_Header and claim_numb. I am trying to merge the two tables so I have Data3, which has all the claim_numb from Data1 matched with the&amp;nbsp;Date_Begin_Service_Header variable from Data2. But when I merge, the Date_Begin_Service_Header variable is blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 18:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696008#M25225</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-11-02T18:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with merge</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696009#M25226</link>
      <description>For all records? That means that the claim numbers never match for some reason. Are they formatted the exact same, ie leading zeros? &lt;BR /&gt;Usually it's because their's a mismatch in cases, leading/trailing spaces or invisible blanks that lead to the issue.</description>
      <pubDate>Mon, 02 Nov 2020 18:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-merge/m-p/696009#M25226</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-11-02T18:11:11Z</dc:date>
    </item>
  </channel>
</rss>

