Hi everyone,
Can you help me on how to use not like operator in a case when statement.
case when ConsumerNumber NOT IN (4* or H* or M* or N* or Q* or R*) then 'Not Selected' Else 'Selected ' end as selectionresult
Thanks
case when first(ConsumerNumber) IN ("4", "H", "M", "N", "Q", "R") then 'Selected' Else 'Not Selected ' end as selectionresult
can you show the LOG you get when running that code? Copy the entire proc step with messages and paste into a code box opened on the forum with the </> icon.
case when first(ConsumerNumber) IN ("4", "H", "M", "N", "Q", "R") then 'Selected' Else 'Not Selected ' end as selectionresult
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →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.