proc sql question


No cake for spunky
This one is driving me crazy. I want to exclude those who meet two conditions. They have been in my organization six months or less and have no cost. Its easy to query for them, but I can not think how to exclude them. To count them only it would be

WHERE t1.CostNM = 0 AND t1.Duration1 <= 6;

how do you say where not [cost =0 and duration <= 6]


No cake for spunky
I found a solution of sorts on line although I would prefer to do it in a query with a where clause. This pulls in those not in a table where I found who meet the criteria above.

proc sql;
create table work.out5 as
select * from work.out4 where VRID not in (select VRID from work.q2);
Mean Joe’s answer will work, as will the following:
where ~((cost = 0) & (duration <= 6));
It’s a personal preference of mine to use the symbolic Boolean operators: (“and” = “&”, “or” = “|”, “not” = “~” or “^”).