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

Home -> Community -> Usenet -> c.d.o.misc -> Re: INSTEAD OF INSERT trigger and SELECT

Re: INSTEAD OF INSERT trigger and SELECT

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 14 Mar 2003 20:14:52 +0100
Message-ID: <uca47vc8i8sno7lortsgsgs27fska0age2@4ax.com>


On Fri, 14 Mar 2003 15:25:55 +0100, Volker Apelt <gq437x_at_yahoo.de> wrote:

>Concept:
>We insert into one table from many clients via mass inserts.
>Each row is unique and part of one unique constraint.
>The inserted rows can be duplicates of some already
>existing rows in the database. So, for dups we will recieve
>an ORA-0001 and the entire mass insert is rolled back.
>But, we need one and only one of them in the database (uniquenes).

you would better redesign the concept, instead of designing mickey mouse code to fight symptoms.
Hence you would better either

- make the rows artificially unique
- use deferred constraints
- dump the unique constraint alltogether as you can't guarantee
uniqueness
All of these alternatives are preferred to the crap you have now.

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Fri Mar 14 2003 - 13:14:52 CST

Original text of this message

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