Subject | Re: [firebird-support] Update generators inside a stored procedure |
---|---|
Author | Nick Upson |
Post date | 2007-02-16T12:33:17Z |
select gen_id (gen_test, -1 * gen_id(gen_test, 0)) from rdb$database
into :countid;
into :countid;
On 16/02/07, balazszokker <balazs.zoltan@...> wrote:
> Hi,
>
> I would like to update (or reset) the values of the generators defined
> in the database inside a stored procedure.
>
> I'm trying to do the following:
>
> create procedure UpdateGenTest
> as
> begin
> execute statement gen_id(gen_test, 1);
> end
>
> and this does update the value of the generator, BUT it gives the
> following error:
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 1, char 1.
> <new value of generator>.
>
> I would be most helpful if anybody could help me out.