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!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.