Subject | Re: [firebird-support] merge tables |
---|---|
Author | Ann W. Harrison |
Post date | 2006-05-01T16:00:53Z |
Ivan Setya Darmawan wrote:
with a generator, the second part being either N (for North Pole
customers) or S (for south pole customers.).
idea. Especially given the really really abysmal implementation
of RAND in our UDF library.
Regards,
Ann
>Sure it is! Make your primary key compound: one part created
> I need to merge northpole customer
> table and southpole customer table to a single customer table in
> headquater database.
>
> I think, using autoincrement for cust_id is not a choice...
with a generator, the second part being either N (for North Pole
customers) or S (for south pole customers.).
> BEGINUsing a random number generator for primary keys is not a good
> /* Trigger body */
> IF (NEW.CUST_ID IS NULL) THEN
> NEW.CUST_ID = RAND();
> END
>
> Do I on right track here or anyone has many better ideas?
idea. Especially given the really really abysmal implementation
of RAND in our UDF library.
Regards,
Ann