140 proc sql;
141 create table no_zeros as
142 select *, max(flag) as zeros
143 from flags
144 group by date and racenum
145 having calculated zeros=0;
Firstly it's not an ERROR, it's a note. However you need to do
group by date, racenum
not
group by date and racenum
Flip's version is a much better one. You just need to alter it slightly. Instead of deleting records, just keep them.
proc sql;
create table no_zeros as
select * from your_dataset
where a not in (select distinct a from your_dataset where b=0);
quit;