I need to query a name variable and the user wants to know if the name is only a single word. The variable contains business names so should have multiple words. How do I do that.. for the specific words I am using index(lowercase(name), "Corp")>0 but I do not know how to query for a singer word, no matter what it is. The name field is Char 26.
Any assistance you can offer will be greatly appreciated.
Thanks,
Elliott
no, I need to identify if the business name is only a single word, no matter how many characters. The user feels this may be an invalid name and wants to review the information. They feel a single name with no spaces is an invalid business name and should be flagged.
Thanks,
COUNTW() is correct, please try it and let us know. If it's not, post the code you've tried and show an example of a case it doesn't find.
@Elliott wrote:
no, I need to identify if the business name is only a single word, no matter how many characters. The user feels this may be an invalid name and wants to review the information. They feel a single name with no spaces is an invalid business name and should be flagged.
Thanks,
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 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.