Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to generate a unique and sequential string/number for TranxID for Triggers

Re: How to generate a unique and sequential string/number for TranxID for Triggers

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 01 Sep 2005 21:08:32 +0800
Message-ID: <4316FD50.15EC@yahoo.com>


mullin wrote:
>
> Hi,
>
> Now, I'm using dbms_transaction.local_transaction_id to
> generate a unique ID among different tables' triggers (insert, update,
> delete) since they
> are under same transaction.
>
> But, the transaction id isn't in sequence that i want to sort by
> transaction id to know
> the sequence.
>
> Any suggestions and solutions?
>
> Thanks!

If the first table in the transaction is always known, then use a sequence and use seq.nextval, and seq.currval for all subsequent tables.

hth
connor

-- 
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
Co-author: "Oracle Insight - Tales of the OakTable"

web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald_at_yahoo.com


"Semper in excremento, sole profundum qui variat."

------------------------------------------------------------
Received on Thu Sep 01 2005 - 08:08:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US