Skip to Content
0
Sep 25, 2014 at 02:06 PM

SQL Anywere 12 insert record for each date between two dates

39 Views

A part of a function in our database looks like this:

while @datecount <= today() loop

set @datecount = dateadd(day, 1, @datecount);


insert into gt_datetable( countdate ) values ( @datecount );

end loop;

We have to insert about 200000 records in this way and wonder if there is a script with a better performance.

Thanks

Eric