Subject | Re: Generators and Stored Procedures |
---|---|
Author | buppcpp |
Post date | 2005-06-17T09:30:49Z |
> Nope. Generator name is a SQL identifier which can be neverrepresented 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.That's fine, but how come it still doesn't work when you use a
>
>
> Dmitry
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.