05-01-2018 03:10 PM
I am working with a group of customers that have responded to various source codes. Some source codes start with a number and some start with a letter which differentiates different sales avenues. What I am looking to do is to group these into two groups by assigning a logic statement as a calculated item. Something like.
If (source code) begins with a letter assign a 1 if not a 0.
I was playing with the following: (actual screenshot attached below)
substring (data field) 1, 1
= ( blank )
but i didn't know if that would work as i don't know how to tell it to identify a letter in the blank field. Does this make sense? Can someone help me?
Thanks in advance.
05-02-2018 07:27 AM
Thank you. This worked brilliantly. I appreciate you taking the time to help me on this. Stay tuned as I am new to SAS, I'm sure I will be looking for additional assistance.
05-02-2018 04:32 PM
I'm glad you found some useful info! If @FredrikE's reply was the exact solution to your problem, can you "Accept it as a solution"? Or if one was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.
Thanks and looking forward to "seeing" you on the community!
Need further help from the community? Please ask a new question.