@vldicker wrote: So your code worked the fastest when I tried what you replied with. But it makes a double copy of everything (which can be deleted with a proc sort) but is there a reason it does that?
Your code had two output statements. So you get one with the first value of id and then because your ELSE doesn't include any statements you get a second for the first value of id.
Date Want;
set have;
by id;
if first.id then do;
date=date1;
output;
end;
else;
date=date1;
do unitl (date2);
date+1;
output;
end;
format date mmddyy10.;
run;
... View more