<?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: Match on name issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/921066#M362746</link>
    <description>You don't specify where the extra space is. Note that trailing spaces are ignored when joining string values.</description>
    <pubDate>Wed, 20 Mar 2024 08:32:57 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2024-03-20T08:32:57Z</dc:date>
    <item>
      <title>Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911177#M362616</link>
      <description>&lt;P&gt;I am fairly new to SAS and I have 2 queries that I am trying to merge together and I'm joining by a full outer join. The names are almost the same except 1 set of data has additional space and parentheses next to the name. So, the code is not finding all of the names:&lt;/P&gt;&lt;P&gt;How would I edit the code below to shorten the 'Edited Name' to shorten it if it has a space and parentheses so that they will match better. There is another item I can match on which is the SerID but issue is when I add this in the count distinct messes up so I'm trying to figure out if either I can join on data that isn't in the table or join on a name that sort of matches and will if edited in the formula below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;&amp;nbsp;CREATE TABLE WORK.TEST AS&lt;BR /&gt;SELECT DISTINCT t1.'Edited Name'n,&lt;BR /&gt;t2.'N_DISTINCT_of_SerID'n,&lt;BR /&gt;t1.'N_DISTINCT_of_OLH: SupID'n&lt;BR /&gt;FROM WORK.TEST t1&lt;BR /&gt;FULL JOIN WORK.QUERY_FOR_TEST t2 ON (t1.'Edited Name'n = t2.'OrigName'n)&lt;BR /&gt;ORDER BY t1.'N_DISTINCT_of_OLH: SupID'n DESC;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911177#M362616</guid>
      <dc:creator>squeakums</dc:creator>
      <dc:date>2024-01-10T18:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911178#M362617</link>
      <description>&lt;P&gt;How about:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;on compress(t1.'Edited Name'n,"( )") = compress(t2.'OrigName'n,"( )")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the second argument to compress() function means "delete all spaces and parenthesis".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911178#M362617</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-01-10T18:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911179#M362618</link>
      <description>&lt;P&gt;Removing parentheses is easy, the Compress function will do that. The question is where is the extra space and would we recognize it as such?&lt;/P&gt;
&lt;P&gt;You should provide examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if the "count" gets messed up when you have another identification variable then perhaps you don't want to match on only the name as names are unlikely to be unique in any largish real world source, especially if only looking at a first and last name. How do you &lt;STRONG&gt;know&lt;/STRONG&gt; that possibly duplicated names are not different people if not looking at other information?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911179#M362618</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-01-10T18:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911180#M362619</link>
      <description>&lt;P&gt;Where would I add this in the code please?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911180#M362619</guid>
      <dc:creator>squeakums</dc:creator>
      <dc:date>2024-01-10T18:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911199#M362620</link>
      <description>&lt;P&gt;You just replace your ON condition in your posted example with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt; 's.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 22:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/911199#M362620</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-01-10T22:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Match on name issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/921066#M362746</link>
      <description>You don't specify where the extra space is. Note that trailing spaces are ignored when joining string values.</description>
      <pubDate>Wed, 20 Mar 2024 08:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Match-on-name-issue/m-p/921066#M362746</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-03-20T08:32:57Z</dc:date>
    </item>
  </channel>
</rss>

