Subject Re: [firebird-support] Setting a generator
i do not understand what you try to do (why you need to set value of get max in procedure) but:
gen_id(generator_name, –gen_id(generator_name, 0)+your_get_max_value)
Karol Bieniaszewski
Sent: Monday, May 2, 2016 6:40 PM
Subject: [firebird-support] Setting a generator

I've created a generator that must have an inital value depending of a field max value.

Inside a SP a tried to select the max value, keep into a variable and then use the variable to set the generator value, but "set generator" or "alter sequenze" is not compatible in a stored procedure.

How can I set the generator using a variable or select max()?

Thank you,

Xavier Garcia