Subject | Re: [firebird-support] Optized index |
---|---|
Author | Ann W. Harrison |
Post date | 2006-02-07T00:27:20Z |
skander_sp wrote:
again - assigning identifiers by finding the max identifier currently
used does not work in Firebird. You'll get duplicates.
Either use a generator or check the archives of this list of
multi-user safe ways of creating unique identifiers.
Regards,
Ann
>Don't do that. It doesn't work multi-user. Let me say that
> In the trigger before insert I load N_Doc as higher numer of same
> year, this way:
>
> select coalesce(max(N_Doc),0)+1
> from Docs
> where N_year=new.N_year
> into new.N_Doc;
again - assigning identifiers by finding the max identifier currently
used does not work in Firebird. You'll get duplicates.
Either use a generator or check the archives of this list of
multi-user safe ways of creating unique identifiers.
Regards,
Ann