BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Kurt_Bremser
Super User

You cannot use the formatted values in a WHERE, unless you also use the PUT function with the respective format.

where put(region,$RTypeFmt.) in ('Asia','Europe','Africa');
PaigeMiller
Diamond | Level 26

@Uddin wrote:
Hi Paige,

Thank you so much for your kind response. I tried with both ways as you suggested but it shows all group without WHERE statement like this:
[cid:5ecd9f9b-14d3-4c85-b2ad-520051335356]

And with WHERE statement it shows error in WHER statement. Looking forward to your kind response.

 

As others have said, its time for you to stop saying you get errors, and SHOW US the log, including your code as it appears in the log.

 

In my earlier comment, I said you need to delete the WHERE and add the FORMAT statement, which would work.

--
Paige Miller

SAS Innovate 2025: Call for Content

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 16 replies
  • 907 views
  • 0 likes
  • 4 in conversation