<?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: Join operator sounds like to compare two strings in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272215#M18892</link>
    <description>&lt;PRE&gt;
YES.
SQL operator   =*   is for sound like. or you should check other functions like SPEDIS(),COMGEN() ........
Due to big table, I suggest to split it many sub-table,and make a macro to go through all these sub-tables,and SET them back together.



&lt;/PRE&gt;</description>
    <pubDate>Sat, 21 May 2016 03:32:42 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-05-21T03:32:42Z</dc:date>
    <item>
      <title>Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272044#M18869</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi guys&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Need some help with a join for a large amount of data, almost 2 million registers on table 1 &amp;nbsp;and 300.000 on table 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;We need to compare two strings on the where clause, but with an operator other than “equal”, &amp;nbsp;we need an operator that can match by sounds like. Unfortunately we don't have any other variable to compare&amp;nbsp;besides NAME, and the same names are typed in different ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;We don't expect results 100% right but something to guide us on the right direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;SQL&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color="#0000FF"&gt;CREATE TABLE&lt;/FONT&gt; WORK.WANT &lt;FONT color="#0000FF"&gt;AS&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;FONT color="#0000FF"&gt;SELECT DISTINCT&lt;/FONT&gt;&amp;nbsp;t1.NAME t2.NAME&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#0000FF"&gt;FROM&lt;/FONT&gt; WORK.HAVE_1 t1 &lt;FONT color="#0000FF"&gt;INNER JOIN&lt;/FONT&gt; WORK.HAVE_2 t2 &lt;FONT color="#0000FF"&gt;ON&lt;/FONT&gt; (t1.NAME &lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;sounds like&lt;/STRONG&gt;&lt;/FONT&gt; t2.NAME);&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;Is there any operator or SAS function that can do this? t1.NAME has length of 201 and t1.NAME has length of 40.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;Example of data that we want to match using this join:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;t1.NAME = MICHAEL JOHN TIM&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;t2.NAME = MICHAEL J. TIM&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000000"&gt;Thanks and regards!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 17:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272044#M18869</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-05-20T17:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272070#M18871</link>
      <description>&lt;P&gt;&lt;A href="http://www.the-link-king.com/" target="_blank"&gt;http://www.the-link-king.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS code is available on website to help with linkage rules.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're still doing a massive amount of comparisons so it takes time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 18:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272070#M18871</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-20T18:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272126#M18877</link>
      <description>&lt;P&gt;First step: Identify any exact matches.&lt;/P&gt;
&lt;P&gt;Second Remove them from the comparison set. That may greatly reduce what ever you do next.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 20:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272126#M18877</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-20T20:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272213#M18890</link>
      <description>&lt;P&gt;To expand on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;'s idea, look at this recent thread&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Fuzzy-String-Matching-with-inconsistent-data/td-p/270446" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Fuzzy-String-Matching-with-inconsistent-data/td-p/270446&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 03:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272213#M18890</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-21T03:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272215#M18892</link>
      <description>&lt;PRE&gt;
YES.
SQL operator   =*   is for sound like. or you should check other functions like SPEDIS(),COMGEN() ........
Due to big table, I suggest to split it many sub-table,and make a macro to go through all these sub-tables,and SET them back together.



&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 May 2016 03:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272215#M18892</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-05-21T03:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Join operator sounds like to compare two strings</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272255#M18899</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;Thanks it worked fine.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Follow the code and result of a test that I did with some drivers names and operator &lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;=*&lt;/STRONG&gt; &lt;/FONT&gt;(sounds like).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again guys!!&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
length id $5;
length name $20;
   input id $ 1-5 name &amp;amp; $ 6-20;
   datalines;
11111 DAVID COULTHARD
22222 FERNANDO ALONSO
33333 SEBASTIAN VETTEL
44444 MAX VERSTAPPEN
55555 JENSON BUTTON
;
run;

data b;
length id $5;
length name $20;
   input id $ 1-5 name &amp;amp; $ 6-20;
   datalines;
66666 DAVID COULTH
77777 FERNAN ALO
88888 SEBASTI VET
99999 MAX VERSTA
00000 KIMI RAIKKONEN
;
run;

PROC SQL;
   CREATE TABLE c AS 
   SELECT t1.name, 
          t2.name AS name1
      FROM a t1
           INNER JOIN b t2 ON (t1.name =* t2.name);
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3281i60646299BBDD278B/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="sounds like.jpg" title="sounds like.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2016 16:44:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Join-operator-sounds-like-to-compare-two-strings/m-p/272255#M18899</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-05-21T16:44:44Z</dc:date>
    </item>
  </channel>
</rss>

