BookmarkSubscribeRSS Feed
Patrick
Opal | Level 21

@kkLaRue81 

The code I've pasted using the sample data as shared returns below result. 

....except that when copy/pasting the sample data I've missed one semicolon - add it so the data section ends with 4 such semicolons.

Patrick_0-1650337695092.png

 

If you run the code against your real data not using the $upcase3. informat then you need to ensure that all the Yes and No strings are set up uppercase YES and NO before using the whichc() function

 

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 25. 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
  • 15 replies
  • 1964 views
  • 3 likes
  • 4 in conversation