09-30-2014 01:05 PM
I am trying to use this code in SAS9.4 and it says
"where clause has been augmented" .....giving me zero records.
If I don't put the where same and .......... I am getting records
Could you please give me some insights where I am going wrong???
where Key4 between &bgndt and &enddt;
where same and Key1 ne 1999 and Key2 = 1555 and Key3 IN (12, 15);
09-30-2014 01:22 PM
It's possible that you've done nothing wrong. It's the data's fault.
When you remove SAME AND, the first WHERE statement is ignored. You are getting records that satisfy only the second WHERE statement.
When you add SAME AND, the selected observations have to satisfy both WHERE statements. Perhaps there are no observations in your data that satisfy both WHERE statements.
10-01-2014 08:48 AM
It looks like you shouldn't use double WHERE clause . But you can also do it so by :
data want; set sashelp.class; where sex='M'; where also age=15; run;