<?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: joining 2 datasets fuzzy matching in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/joining-2-datasets-fuzzy-matching/m-p/645317#M192890</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/63286"&gt;@DaveLarge&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried something like this. Please test it on several cases so that you can see if it sensitive / specific enough.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-05-05 à 16.45.05.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39081iB67BABEBC9764F88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-05-05 à 16.45.05.png" alt="Capture d’écran 2020-05-05 à 16.45.05.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
	infile datalines dlm="09"x;
	input Name:$20. Long Lat;
	datalines;
Midgar	34	64
	;
run;

data b;
	infile datalines dlm="09"x;
	input Possible_Name:$20. Details_1:$20. Details_2:$20.;
	datalines;
75 MidGAR street	need this	And and this
	;
run;

proc sql;
	select a.Name, b.Possible_Name, a.Long, a.Lat, b.Details_1, b.Details_2
	from a full join b /* select the proper type of join */
	on find(compress(b.Possible_Name," "), compress(a.Name," "), "i") &amp;gt; 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2020 14:45:26 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-05-05T14:45:26Z</dc:date>
    <item>
      <title>joining 2 datasets fuzzy matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/joining-2-datasets-fuzzy-matching/m-p/645309#M192884</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im sure i done this in the past but can think for the life of me how i did this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i have 2 datasets where&amp;nbsp; A=robust name and adresses B= contains a field that would have the name in example -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Name&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Long&lt;/TD&gt;&lt;TD&gt;Lat&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Midgar&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;64&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;possible name&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Details_1&lt;/TD&gt;&lt;TD&gt;Detail_2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;75 MidGAR street&lt;/TD&gt;&lt;TD&gt;need this&lt;/TD&gt;&lt;TD&gt;And and this&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to join the tables where B.possible_name has A.Name in any format and any space within the field&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think i used wildcard fuzzy matching but unable to replicate this so far&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help would be great&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 14:33:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/joining-2-datasets-fuzzy-matching/m-p/645309#M192884</guid>
      <dc:creator>DaveLarge</dc:creator>
      <dc:date>2020-05-05T14:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: joining 2 datasets fuzzy matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/joining-2-datasets-fuzzy-matching/m-p/645317#M192890</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/63286"&gt;@DaveLarge&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried something like this. Please test it on several cases so that you can see if it sensitive / specific enough.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-05-05 à 16.45.05.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39081iB67BABEBC9764F88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-05-05 à 16.45.05.png" alt="Capture d’écran 2020-05-05 à 16.45.05.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
	infile datalines dlm="09"x;
	input Name:$20. Long Lat;
	datalines;
Midgar	34	64
	;
run;

data b;
	infile datalines dlm="09"x;
	input Possible_Name:$20. Details_1:$20. Details_2:$20.;
	datalines;
75 MidGAR street	need this	And and this
	;
run;

proc sql;
	select a.Name, b.Possible_Name, a.Long, a.Lat, b.Details_1, b.Details_2
	from a full join b /* select the proper type of join */
	on find(compress(b.Possible_Name," "), compress(a.Name," "), "i") &amp;gt; 0;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2020 14:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/joining-2-datasets-fuzzy-matching/m-p/645317#M192890</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-05-05T14:45:26Z</dc:date>
    </item>
  </channel>
</rss>

