Proc sql;
create table mytable as
select distinct b.*,
if b.rate < 35 then '50th'
else if < 50 then '75th'
else if < 75 then '80th'
else if >=75 'this is the one' as label = 'done'
, a.diagcode
from tableb b left join tablea a on....
Or if statement can't be used inside proc sql and we need to use case statement only?
Respectfully,
blue blue
I'm pretty sure we gave you the answer to this in another of your questions. There is no such thing as IF logic in SQL only CASE.
I've followed your progress on the Community with interest and respectfully I think you are missing some basic SAS concepts that would really speed up your learning.
I suggest you start using the free SAS online learning resources like this huge list of how-to tutorials
And explore the SAS documentation
These will really supercharge your learning!
I am so grateful to your response.
I have a couple of certificates in SAS. I am doing SAS Base currently, and I get any chance, I will listen to my tutorials again. I wish I had not gone for it at all!
I am currently covering The little SAS Book.
I will go to the links you sent me, thank you very much. Unfortunately topics that I post here requires answers for my project that are due. SAS documentation is very technical and it is very hard to understand, at least for me.
I probably asked you this question before, but what happens is if I don't use them, I will lose them. The way you mentioned to me here, believe me, I wont' forget it.
Thanks for your advice and link you sent me.
Blue Blue
No problem. Best of luck on your SAS journey!
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.