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 -> How can I use N different where clauses in a single update statement?

How can I use N different where clauses in a single update statement?

From: dean <deanbrown3d_at_yahoo.com>
Date: 14 Sep 2005 09:22:21 -0700
Message-ID: <1126714941.573984.76610@z14g2000cwz.googlegroups.com>


Here's my query:

update TRAIN_WORK_EVENT TWE

set    TWE.CURRENT_LOCATION_I = '000805'
where  TWE.TRAIN_I            = 15585
and    TWE.P_VERSION_I        = 337251
and    TWE.CURRENT_ROUTE_I    = 106106;
update TRAIN_WORK_EVENT TWE
set    TWE.PU_LOCATION_I      = '000805'
where  TWE.TRAIN_I            = 15585
and    TWE.P_VERSION_I        = 337251
and    TWE.PU_ROUTE_I         = 106106;
update TRAIN_WORK_EVENT TWE
set    TWE.SO_LOCATION_I      = '000805'
where  TWE.TRAIN_I            = 15585
and    TWE.P_VERSION_I        = 337251
and    TWE.SO_ROUTE_I         = 106106;

Because of a limitation in my compiler's ADO pasring, I cannot send this as a single query, it has to be 3 update statements. Note that the WHERE clause is different, and the rows that need top be updated are different.

Thanks,

Dean Received on Wed Sep 14 2005 - 11:22:21 CDT

Original text of this message

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