Subject Re: [firebird-support] Re: Query best practice / optimizer
Author Damir Tesanovic
Or maybe you could create above procedure (there are probably some syntax
mistakes):
create procedure (begin_date as date, end_date as date) returning (ret_date
date, resnum integer)
as
ret_date= begin_date;
while (begin_date <= end_date) do
begin
select count(id) from reservations where :ret_date between datein and
dateout into :res
suspend;
ret_date = ret_date + 1;
end
end;

I don't know how fast is this procedure because I didn't tryed it but with
this aproach you don't have to create any extra tables.


[Non-text portions of this message have been removed]