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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to update 2 records simultaneously on a self-join?

Re: How to update 2 records simultaneously on a self-join?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 27 Aug 2006 17:35:20 -0700
Message-ID: <1156725320.869830.327590@h48g2000cwc.googlegroups.com>

Sybrand Bakker wrote:
> On 27 Aug 2006 07:18:28 -0700, "sidey" <sideyt_at_hotmail.com> wrote:
>
> > IS there any way to update an Oracle table using pairs of records,
> >update both records simultaneously and preferably proceed in descending
> >order on fieldC?
>
>
> Oracle happens to be a Relational Database Management System.
> In RDBMSes all operations occur on *sets*
> By mathematical definition set have *no order*
> So either you should go back to a flat file system, or to punch cards.
>
> --
> Sybrand Bakker, Senior Oracle DBA

Sidey, why can't you define all the updates that need to take place so that they execute in a single transaction, that is, several update statements followed by one commit?

There are numerous examples of before and after insert triggers in the official documentation so you should have no problem figuring out how to write one. See Concepts, DBA Administration, and PL/SQL manual for help.

HTH -- Mark D Powell -- Received on Sun Aug 27 2006 - 19:35:20 CDT

Original text of this message

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