Subject Re: [IBO] Generators
Author Luiz Alves
"Select gen_id(Gen_Name,inc_value) from rdb$database"
Sample:

SQL:"Select gen_id(id_agenda,1) from rdb$database"
increment id_agenda generator in 1

"Select gen_id(id_agenda,-1) from rdb$database"
decrement id_agenda generator in -1

"Select gen_id(id_agenda,-1) from rdb$database"
decrement id_agenda generator in -1

"Select gen_id(id_agenda,gen_id(id_agenda,0)*(-1)) from rdb$database"
reset generator to 0.

"Select gen_id(id_agenda,gen_id(id_agenda,0)*(-1)+2) from rdb$database"
reset generator to 2.

I guess that you can't use 'set generator .....' in SQL query, only in a
script.

Luiz.

----- Original Message -----
From: <paolopf@...>
To: <IBObjects@egroups.com>
Sent: Monday, January 01, 2001 7:15 PM
Subject: [IBO] Generators


> Hi list,
> could anyone help me telling if it's possible to change, on the run,
> generators, and how?
>
> Thanks
> Paolo.
>
>
>
>