RE: AW: Constraint violation in spite of trigger with sequence

From: Mark W. Farnham <>
Date: Tue, 2 Feb 2010 12:44:05 -0500
Message-ID: <>

Does anything else happen to :new.num after it has been selected from the sequence in the bits of the trigger you have omitted?

Plus, did you answer the question from Toon yet? You should only be creating the sequence once, in a quiet period. (Or as a repair, I suppose, but not as part of the insert process each time).

-----Original Message-----
From: [] On Behalf Of A. Stiebing
Sent: Tuesday, February 02, 2010 11:14 AM To: 'Jay'; 'chet justice'; <snip>
> I assume you are showing us the 'select max(...' + the 'create
> sequence' command because you have done that once.
> Or are you doing this inside some process, *every time*?
> In the latter case. It could very well be that between the 'select
> max' and the 'get nextval' some other session had been adding a row to
> that table, with a value that now also is generated by the sequence.


Received on Tue Feb 02 2010 - 11:44:05 CST

Original text of this message