Subject | Re: [firebird-support] Re: Reset genretor Value |
---|---|
Author | Ricardo Uzcategui |
Post date | 2010-12-29T18:07:34Z |
YES. Yu can't execute a ddl statement from sp or trg.
2010/12/29 Svein Erling Tysv�r <svein.erling.tysvaer@...>
Ricardo...
[Non-text portions of this message have been removed]
2010/12/29 Svein Erling Tysv�r <svein.erling.tysvaer@...>
>--
>
> Try something like
>
> SELECT GEN_ID(TEKLIFM_TEKLIFM_Ay_GEN, -GEN_ID(TEKLIFM_TEKLIFM_Ay_GEN,0))
> FROM RDB$DATABASE
>
> That should subtract the current value of the generator from its value and
> the result should be 0 and, unlike SET GENERATOR, it is DML rather than DDL
> (theoretically, I think you risk getting a negative in the generator if two
> transactions fire this statement at the same time).
>
> HTH,
> Set
> ________________________________________
> Fra: firebird-support@yahoogroups.com <firebird-support%40yahoogroups.com>[
> firebird-support@yahoogroups.com <firebird-support%40yahoogroups.com>]
> på vegne av ahmetdenize [ahmetdenize@...<ahmetdenize%40yahoo.com>
> ]
> Sendt: 29. desember 2010 14:26
> Til: firebird-support@yahoogroups.com <firebird-support%40yahoogroups.com>
> Emne: [firebird-support] Re: Reset genretor Value
>
>
> I test it before with flame robin it is not working . My code is
> if (extract(year from current_date) <> YilInt) then SET GENERATOR
> TEKLIFM_TEKLIFM_Ay_GEN TO 0;
>
> error message is
> if (extract(year from current_date) <> YilInt) then SET GENERATOR
> TEKLIFM_TEKLIFM_Ay_GEN TO 0;
>
> --- In firebird-support@yahoogroups.com<firebird-support%40yahoogroups.com>,
> Claudio Romero <clauslack@...> wrote:
> >
> > Be careful
> > with
> > SET GENERATOR GEN_EMAIL_ID TO 0;
>
>
Ricardo...
[Non-text portions of this message have been removed]