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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: HELP - Insert/Update trigger

RE: HELP - Insert/Update trigger

From: Fred Smith <fred_fred_1_at_hotmail.com>
Date: Tue, 13 Feb 2001 11:50:00 -0800
Message-ID: <F001.002B2ED8.20010213114621@fatcity.com>

Dan,
  If I send an update to the table, an no record exists to update, Oracle does not throw an ORA- error. (It just says "zero records exist".) Is there a way around this??
Thanks,
  -FS

>From: "Dasko, Dan" <Dan.Dasko_at_cdicorp.com>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: HELP - Insert/Update trigger
>Date: Tue, 13 Feb 2001 10:51:22 -0800
>
>Dang it,
>Brian you're right, I didn't read the original post thoroughly.
>
>Instead of batch inserts, do batch updates and in the exception handler, do
>the insert.
>Or you could use the %FOUND flag based on a select PK from table.
>
>Dan
>
>-----Original Message-----
>Sent: Tuesday, February 13, 2001 12:56 PM
>To: Multiple recipients of list ORACLE-L
>
>
>Not with a normal table trigger. Try creating a non-updateable view with
>an
>"instead of" trigger for the insert.
>
>Brian Norrell
>Senior Software Engineer
>QuadraMed
>972-831-6600
>
>
>-----Original Message-----
>Sent: Tuesday, February 13, 2001 9:26 AM
>To: Multiple recipients of list ORACLE-L
>
>
>Listers,
>
> I am attempting to write a trigger on a table that will have batch
>inserts nightly. I want each insert to check to see if a record with that
>primary key exists, and if it does, update the record. If the primary key
>does not yet exist in the table, insert the record. The batch load each
>night is a large series of inserts, no updates. I want the trigger to
>figure out it if needs to update or insert.
>
>Can this be done??
>
>Thank you,
> -Fred Smith
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Fred Smith
> INET: fred_fred_1_at_hotmail.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Norrell, Brian
> INET: BNorrell_at_QuadraMed.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>
>_____________________________________________________________________
>This message has been checked for all known viruses by UUNET delivered
>through the MessageLabs Virus Control Centre. For further information visit
>http://www.uk.uu.net/products/security/virus/
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Dasko, Dan
> INET: Dan.Dasko_at_cdicorp.com
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).



Get your FREE download of MSN Explorer at http://explorer.msn.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Fred Smith
  INET: fred_fred_1_at_hotmail.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Feb 13 2001 - 13:50:00 CST

Original text of this message

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