I have a dataset with one variable that contains name information along with suffixes and titles. There are also commas and slashes and there are also blanks. It looks like this:
BusinessContact |
Dr. Moon S. Park, FCAP |
Stacy Petersen |
Dr. Andrew Schwartz |
Katie Bova |
Ms. Melissa Guiba |
Mr. Leonard Licina |
OM is Shelly |
W.M. Morrow |
Business Managaer - Sandy Nikaitani |
Mr. Kevin A. Roberts |
Tracy Sawada |
Faith |
Mr. George Newton |
Angie Bugaran |
Chris |
Henry Yim/Kelly Tuamoheloa |
Ms. Merilyn Harris |
Faith |
Gerald McKenna, M.D. |
Mr. Herbert Yim |
Mr. Ira Walton |
Ms. Orianna Skomoroch |
How can I take that column and convert it into two where it's split out by First Name and Last Name with the titles (Mr., Mrs., Ms., Dr.) and suffixes (M.D., FCAP) excluded?
You need to develop a step-by-step clean-up logic. This is an iterative process by trial and error. For example:
1. Remove titles
when that's done
2. split records with several names into several observations
then
3. extract name components as desired
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.