Hello,
I created a PROC SQL code below. I found out that the result came out with missing data, I have restrict the Status=4, I don't understand why 'status=.' is still showing even though I have put 'Status=4 and Status ^=.'
So the strange thing is at the first beginning, I only put 'Status=4', then I found 'Status=.' was showing in the result.
Then I put 'Status=4 and Status ^=.', I still found 'Status=.' was showing in the result.
Really beats me!
proc sql;
create table want as
select site, id, CultureDate,AdmitDate,VisitDate,Culture
from have
where Status = 4 and Status ^=. and Culture = 1 and VisitDate ne . and AdmitDate ne .
and CultureDate ne . and CultureDate ^= '01Jan8888'd
and ((CultureDate lt VisitDate) or (CultureDate gt AdmitDate+3))
order by site, id;
quit;
Hello @ybz12003,
How did you determine the value of STATUS for an observation in dataset WANT, given that STATUS is not among the variables listed in your SELECT statement and hence will not be contained in WANT?
Hello @ybz12003,
How did you determine the value of STATUS for an observation in dataset WANT, given that STATUS is not among the variables listed in your SELECT statement and hence will not be contained in WANT?
LOL! Thank you so much!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.