BookmarkSubscribeRSS Feed
abdulla
Pyrite | Level 9

Hi,

I have attached an excel file. I want to match group A with group B using names. The different colors show the matching names. However, the names don't exactly match in two different groups. One of the ways we can match is by using the last name. But the last name is not always used similarly in the two groups, for example, John Holmes III. Also, in my large dataset, two different persons in the same firm and in the same year may have the same last name. How will I handle all these issues and how will I perfectly match one dataset with another dataset using names? Could you please help me? 

 

 

4 REPLIES 4
SASKiwi
PROC Star

Perfect matching of free-text names is not possible. Only unique and totally accurate name keys like Customer_ID or Employee_ID will result in perfect matching.

 

The best you can do is to try and standardise the first and last names, if those are the only two columns available to you and try and get as high a match rate as possible. Also is it possible that two different people could share the same name? 

PeterClemmensen
Tourmaline | Level 20

It will never be an exact match when the rules are not perfectly defined. However, for most purposes you can do a good job with fuzzy matching. 

 

There are many axamples online .

ChrisNZ
Tourmaline | Level 20

two different persons in the same firm and in the same year may have the same last name. How will I handle all these issues 

Some questions such as these you need to decide what's teh best for you.

For fuzzy string matching, there are several SAS functions such as SPEDIS or COMPGED.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1109 views
  • 3 likes
  • 5 in conversation