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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 4144 views
  • 3 likes
  • 4 in conversation