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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2090 views
  • 0 likes
  • 4 in conversation