<?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: Compare 2 string columns and compute percentage match in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892959#M352724</link>
    <description>&lt;P&gt;Thank you, I will review the docs.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 15:12:19 GMT</pubDate>
    <dc:creator>deblee73</dc:creator>
    <dc:date>2023-09-06T15:12:19Z</dc:date>
    <item>
      <title>Compare 2 string columns and compute percentage match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892946#M352713</link>
      <description>&lt;P&gt;Hello.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 files and I have to link them by customer name but the names in one file are not spelled correctly.&amp;nbsp; Is there some code to compare the 2 columns and return % match based on some algorithm looking at number of characters, order of characters, etc.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test dataset below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data yourdata;&lt;BR /&gt;infile datalines dlm=' ';&lt;BR /&gt;input String1 $ String2 $;&lt;BR /&gt;datalines;&lt;BR /&gt;George Gorge&lt;/P&gt;&lt;P&gt;George George&lt;/P&gt;&lt;P&gt;George Georg&lt;/P&gt;&lt;P&gt;George Grge&lt;/P&gt;&lt;P&gt;George Greg;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Guess of what the output would be&amp;nbsp;arbitrarily picking percentages&amp;nbsp;:&amp;nbsp; data in () are my thoughts.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;George Gorge&amp;nbsp; &amp;nbsp;83%&amp;nbsp; (less 1 character and out of order)&lt;/P&gt;&lt;P&gt;George George&amp;nbsp; 100%&amp;nbsp; (same # of characters in same order)&lt;/P&gt;&lt;P&gt;George Georg&amp;nbsp; &amp;nbsp;90% (same order short 1 character)&lt;/P&gt;&lt;P&gt;George Grge&amp;nbsp; 60%&amp;nbsp; (short 2 characters but not out of order)&lt;/P&gt;&lt;P&gt;George Greg&amp;nbsp; 50%&amp;nbsp; (short2 characters and out of order)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 14:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892946#M352713</guid>
      <dc:creator>deblee73</dc:creator>
      <dc:date>2023-09-06T14:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 string columns and compute percentage match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892950#M352716</link>
      <description>&lt;P&gt;It's not % difference, but for something similar, there are functions COMPLEV and COMPGED, also older SPEDIS.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1r4l9jwgatggtn1ko81fyjys4s7.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p1r4l9jwgatggtn1ko81fyjys4s7.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n0l41pdemybegln1oetsh4cctdap.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/n0l41pdemybegln1oetsh4cctdap.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also you might want to search lexjansen.com for&amp;nbsp; user group papers on fuzzy matching, e.g.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/pharmasug/2022/AP/PharmaSUG-2022-AP-030.pdf" target="_blank"&gt;https://www.lexjansen.com/pharmasug/2022/AP/PharmaSUG-2022-AP-030.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 14:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892950#M352716</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-09-06T14:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 string columns and compute percentage match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892959#M352724</link>
      <description>&lt;P&gt;Thank you, I will review the docs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 15:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compare-2-string-columns-and-compute-percentage-match/m-p/892959#M352724</guid>
      <dc:creator>deblee73</dc:creator>
      <dc:date>2023-09-06T15:12:19Z</dc:date>
    </item>
  </channel>
</rss>

