I have the next code:
"case when t1.AGB_instelling = '1.06' then Key_spec='03.05'
when t1.AGB_instelling = '1.07' then Key_spec='03.06'
end
For eacht AGB_instelling there are N Key_spec, for the two mentioned AGB_inst. I want the mentioned Key_spec but for other AGB_instellingen I don't care. But in the results I only found the two mentioned AGB_instellingen and no other. How can this be solved?
Else.
case when t1.AGB_instelling = '1.06' then Key_spec='03.05'
when t1.AGB_instelling = '1.07' then Key_spec='03.06'
else key_spec="dont care"
end
reeza always beats me to the answer...
you should use the else clause to specify what should happen.
case
when t1.AGB_instelling = '1.06' then Key_spec='03.05'
when t1.AGB_instelling = '1.07' then Key_spec='03.06'
else ????
end
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.