<?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: PROC SQL LIKE operator to combine rows across tables with colums with similar values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786681#M251215</link>
    <description>&lt;P&gt;You haven't posted much detail on the types of fuzzy matching you want. The only example you have given looks like it is made-up. It would be helpful if you could provide more examples. Typically DATA steps are much better for fuzzy matching.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 01:40:26 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-12-20T01:40:26Z</dc:date>
    <item>
      <title>PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786679#M251213</link>
      <description>&lt;P&gt;Hello SAS community:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one table named&amp;nbsp; 'table1' with a column named 'X1' and a second table, 'table2', with a column named 'X2'. I want to combine a row from 'table1' and 'table2' when the value of 'X1' from 'table1' is a 'close' match to the value of 'X2' in 'table2'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if the value of 'X1' from a row in 'table1' is the string 'abc.&amp;amp;.123', and the value of 'X2' from a row in 'table2' is 'abc_and_123', then I would like to return a row which is the combined rows from 'table1' and 'table2' on this 'close' match between variables 'X1' from 'table1' and 'X2' from 'table2'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can use the LIKE operator to locate each row from each table as follows:&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE&gt;/*FOR table1:*/ 
PROC SQL; SELECT X1 
FROM table1 
WHERE X1 LIKE 'abc%123'; 
QUIT; 

/*FOR table2:*/ 
PROC SQL; 
SELECT X2 
FROM table2 
WHERE X2 LIKE 'abc%123'; 
QUIT;&lt;/PRE&gt;&lt;P&gt;&lt;CODE class=""&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Basically I would like to do a JOIN for the two tables on a 'close' match.&amp;nbsp; I wonder if the LIKE operator can achieve this, or perhaps there is another strategy that would allow me to do the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 21:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786679#M251213</guid>
      <dc:creator>Varrelle</dc:creator>
      <dc:date>2021-12-19T21:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786680#M251214</link>
      <description>&lt;P&gt;Search this forum (and google the rest of the internet) for "fuzzy matching".&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 23:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786680#M251214</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-12-19T23:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786681#M251215</link>
      <description>&lt;P&gt;You haven't posted much detail on the types of fuzzy matching you want. The only example you have given looks like it is made-up. It would be helpful if you could provide more examples. Typically DATA steps are much better for fuzzy matching.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 01:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/786681#M251215</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-12-20T01:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787046#M251392</link>
      <description>&lt;P&gt;thanks for the tip &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 02:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787046#M251392</guid>
      <dc:creator>Varrelle</dc:creator>
      <dc:date>2021-12-22T02:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787047#M251393</link>
      <description>&lt;P&gt;thanks for your comment &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 02:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787047#M251393</guid>
      <dc:creator>Varrelle</dc:creator>
      <dc:date>2021-12-22T02:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787048#M251394</link>
      <description>&lt;P&gt;this is a link to a paper that seems to have solved my problem. thanks again to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt; for their helpful feedback and commentary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwignbe4r_b0AhWKd98KHaA9C0UQFnoECAQQAQ&amp;amp;url=https%3A%2F%2Fwww.lexjansen.com%2Fnesug%2Fnesug11%2Fps%2Fps07.pdf&amp;amp;usg=AOvVaw0MS5W2D5bSIwMgJFsB2PWj" target="_self"&gt;NESUG 2011 -- PROC SQL fuzzy matching&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 02:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787048#M251394</guid>
      <dc:creator>Varrelle</dc:creator>
      <dc:date>2021-12-22T02:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL LIKE operator to combine rows across tables with colums with similar values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787161#M251454</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192108"&gt;@Varrelle&lt;/a&gt;&amp;nbsp; - No problem, glad to hear you have figured it out for yourself. Please bear in mind that using a range of techniques is best for fuzzy matching. Start by doing exact matches, then use fuzzy techniques on the remaining data.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 20:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-LIKE-operator-to-combine-rows-across-tables-with-colums/m-p/787161#M251454</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-12-22T20:39:25Z</dc:date>
    </item>
  </channel>
</rss>

