Hi,
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)
regards,
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
__._,_.___
Posted by: <liviuslivius@poczta.onet.pl>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.
__,_._,___
No comments:
Post a Comment