Oops, > Um... The pre-insert trigger fires before the insert actually occurs - so > it won't get the exception. The exception would be caused after the pre-> > insert trigger is finished. Right? David, you are right. Igor Neyman, OCP DBA ineyman@xxxxxxxxxxxxxx -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of david wendelken Sent: Wednesday, May 18, 2005 11:25 AM To: oracle-l@xxxxxxxxxxxxx Subject: RE: TRIGGERS >Handle DUP_VAL_ON_INDEX exception in your trigger and loop (get >sequence.NEXTVAL) untill there is no exception. Um... The pre-insert trigger fires before the insert actually occurs - so it won't get the exception. The exception would be caused after the pre-insert trigger is finished. Right? The pre-insert trigger can't check the table directly to see if it would work, because it will get a mutating-table error. Autonomous transactions might get around the mutating table problem, but multi-user environments could still cause the error to occur. (Not all that likely, but possible.) >BUT, >The bigger question: is there a valid "business" reason to allow >"manually created" IDs when you have a sequnce to generate those? I >think, the problem is in your design. Yep. Exactly right. -- //www.freelists.org/webpage/oracle-l -- //www.freelists.org/webpage/oracle-l