Hi -
I would like to get rid of these apostrophes from first and last names.
Currently names appear as:
"Martha" and I would want to and up with Martha
Should be simple enough,
Thank you,
These are not apostrophes, those are double-quotes. So, do you want to remove single-quotes and double-quotes from the name?
If so, try this:
new_name=compress(name,'"');
to get rid of the double-quotes and if you also want to get rid of single-quotes, use one more command
new_name=compress(new_name,"'");
These are not apostrophes, those are double-quotes. So, do you want to remove single-quotes and double-quotes from the name?
If so, try this:
new_name=compress(name,'"');
to get rid of the double-quotes and if you also want to get rid of single-quotes, use one more command
new_name=compress(new_name,"'");
Thank you so much for the prompt reply!
I will test your suggestions.
Best,
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.