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: INSERT INTO Syntax: Insert a complete record using a cursor

RE: INSERT INTO Syntax: Insert a complete record using a cursor

From: <johanna.doran_at_sungard.com>
Date: Thu, 01 Aug 2002 10:11:17 -0800
Message-ID: <F001.004A91E1.20020801101117@fatcity.com>






RE: INSERT INTO Syntax: Insert a complete record using a cursor




Hi,

        The update method is interesting.  I need to think the reprocussions through first, but that may save me a lot of hassle....

Good idea!


Thanks,

        Hannah

 -----Original Message-----
From:   root@fatcity.com@SUNGARD   On Behalf Of Chaim.Katz@Completions.Bombardier.com
Sent:   Thursday, August 01, 2002 1:34 PM
To:     Multiple recipients of list ORACLE-L
Subject:        RE: INSERT INTO Syntax: Insert a complete record using a cursor


Hannah
Maybe you could temporarily change the insert trigger to an update trigger
(create or replace trigger before insert or update  on...)
and then simply update the table setting some column to itself. This will
will fire the trigger (and will not change any data in the table).
I didn't understand why you want to commit after each row(?), triggers will
fire in any case, but if you need to, you could do the update  in PL/SQL.

hth,
Chaim




"Lakhani, Vipul" <LakhaniV@uk.tigplc.com>@fatcity.com on 08/01/2002
11:44:16 AM

Please respond to ORACLE-L@fatcity.com

Sent by:    root@fatcity.com


To:    Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
cc:

.. or i had a similar problem ... i wrote an update trigger to populate the
backup table ... and i did an update the the master table to update a
record
back to itself ...

update mytab
set acol = acol;

when the update happens use the :old/:new  values to populate the backup
table

-----Original Message-----
Sent: 01 August 2002 15:18
To: Multiple recipients of list ORACLE-L


Hi,

I am writing a one-time proc to copy all records from one table to
another table with a commit level of 1 record.  I wrote a proc to do this
using a cursor and for loop but was wondering if there was an alternative
syntax for the insert using the current cursor?

Instead of having to use the VALUES syntax (the table has ALOT of
columns)


Pretty much my purpose is to get the the table to re-fire an insert
trigger (trigger needed to be disables during the intial load).... so now I
am making a backup table and copying the records in one by one , commiting
each to get the trigger to complete for each row (the trigge fills other
tables etc).

Any suggestions (and yes, I am in the manuals, but they only showing
thus far the VALUES syntax).....

Thanks,

Hannah
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: johanna.doran@sungard.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@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: Lakhani, Vipul
INET: LakhaniV@uk.tigplc.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@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:
INET: Chaim.Katz@Completions.Bombardier.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@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: INET: johanna.doran@sungard.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@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 Thu Aug 01 2002 - 13:11:17 CDT

Original text of this message

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