Subject Re: [firebird-support] For loops in a stored procedure
Author Helen Borrie
At 08:53 AM 20/01/2006 -0500, you wrote:
>IS there a mechanism to do a for loop (not with a select) inside a stored
>procedure?
>
>Something like:
>
>For X = 1 to Term
>Do Begin
> Insert Into ...
>End

Something like....but not a FOR loop. Use a WHILE loop:

create procedure humphrey (termval integer, ....)
..
declare X integer = 0;

..
begin
while (X < termval) do
begin
insert into...
X = X + 1;
end
end

./hb