Subject Re: Generators and Stored Procedures
Author buppcpp
> Nope. Generator name is a SQL identifier which can be never
represented with
> a variable. Some day you'll want to UPDATE :tab_name SET blah-
blah, so I'd
> suggest you to change your thinking right now.
>
>
> Dmitry

That's fine, but how come it still doesn't work when you use a
variable for the incrementor?

ex.

DECLARE VARIABLE gen_increment INTEGER;
DECLARE VARIABLE GVAL BIGINT;

gen_increment = 2;

EXECUTE STATEMENT 'SELECT GEN_ID(MYGEN, :gen_increment) FROM
RDB$DATABASE' INTO :GVAL;


Error:
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
GEN_INCREMENT.