RE: AW: Constraint violation in spite of trigger with sequence
Date: Tue, 2 Feb 2010 12:44:05 -0500
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).
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of A. Stiebing
Sent: Tuesday, February 02, 2010 11:14 AM To: 'Jay'; 'chet justice'; toon.koppelaars_at_rulegen.com <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.
<snip>Received on Tue Feb 02 2010 - 11:44:05 CST