Subject | Re: Listing current generator values, execute statement |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-01-29T14:45:37Z |
--- In firebird-support@yahoogroups.com, Bob Murdoch <ram5@e...>
wrote:
what the type is returned by gen_id. Use explicit Cast:
execute statement 'select Cast(gen_id(' || generator_name || ',0) as
Integer) from rdb$database'
Best regards,
Alexander
wrote:
> execute statement 'select gen_id(' || generator_name || ',0)from
> rdb$database'No, EXECUTE STATEMENT don't make type conversions and don't know
> into :current_value;
>
> The error is:
>
> Variable type (position 0) in Execute Statement 'select
> gen_id(batch_nbr_gen ,0) f' does not match return.
>
> I'm assuming that the value returned from gen_id is not an integer?
what the type is returned by gen_id. Use explicit Cast:
execute statement 'select Cast(gen_id(' || generator_name || ',0) as
Integer) from rdb$database'
Best regards,
Alexander