i'm preparing a stored procedure to manipulate a date datatype. Can somebody help me on how to list out all dates between 2 given dates. For example input 1 is '03/05/2008' and input 2 is '03/08/2008'.
create function datumy (dat1 date,dat2 date)
returning set(date not null);
define diff integer;
define i integer;
define datmn set(date not null);
let diff=diff -1;
for i in (1 to diff step 1)
insert into table(datmn) values(dat1+i);
But instead of inserting the result into a table can I list the result straight away. This is because I need to execute the procedure/function in the client application, I don't want to call another table to get the result.