Although you have a couple of already accepted solutions, I wanted to throw my two cents in as a PROC SQL guy. I use the NOTIN frequently, especially when querying text:
All my data:
proc sql;
select product, count(*)
from sashelp.shoes
group by product
order by product
;
quit;
Results:
Excluding BOOT and SANDAL:
proc sql;
select product, count(*)
from sashelp.shoes
where product notin ('Boot','Sandal')
group by product
order by product
;
quit;
Results:
Good luck!
Chris
... View more