Subject reading a generator value in a stored procedure
Author frische_brise2003
Hi all,

here is my way to read a value from a generator
in a stored procedure (this is only a part of the SP):

DECLARE VARIABLE NUM_VALUE NUMERIC (18, 0);

/* Procedure body */
execute statement ( 'select gen_id(' || :gen_name ||
', 1)FROM rdb$Database' ) into :NUM_VALUE;

I wonder if there is an easier way???


Regards

Jürgen