Desktop productivity for business analysts and programmers

Strip characters from a value in a column

Reply
N/A
Posts: 0

Strip characters from a value in a column

Hi. I am new to SAS (I havent had training yet - but did take the tutorial) and I am looking for a way to format data that I am using in EG. I have a column in my data that is based on customer names. Some names have additional info on the end that I need to remove. IE
1. JOHN DOE
2. JOHN DOE@SAS.COM
If I wanted to strip the @SAS.com or everything after the @ , How would I do that?
In the example above I would want John Doe counted twice not 2 different entries.
Thanks.
N/A
Posts: 0

Re: Strip characters from a value in a column

You can use the following function:

var2 = scan ( var1 , 1 , '@' );
Ask a Question
Discussion stats
  • 1 reply
  • 105 views
  • 0 likes
  • 1 in conversation