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

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

From: Isa <isapmon_at_terra.es>
Date: 14 Sep 2005 09:59:15 -0700
Message-ID: <1126717155.369988.278600@z14g2000cwz.googlegroups.com>


Hi:
I think you can do the next:

update TRAIN_WORK_EVENT TWE

             set
( TWE.CURRENT_LOCATION_I =

                  decode(TWE.CURRENT_ROUTE_I ,106106, '000805',

          TWE.CURRENT_LOCATION_I),
   TWE.PU_LOCATION_I    =
                  decode(TWE.PU_ROUTE_I  ,106106, '000805',

 TWE.PU_LOCATION_I ),
   TWE.SO_LOCATION_I =

                  decode(  TWE.SO_ROUTE_I ,106106, '000805',

  TWE.SO_LOCATION_I)
where  TWE.TRAIN_I            = 15585  and
           TWE.P_VERSION_I  = 337251 and
          (      TWE.CURRENT_ROUTE_I    =106106
                                        or
                 TWE.PU_ROUTE_I         = 106106
                                       or
                 TWE.SO_ROUTE_I         = 106106
           );
     

I hope it's useful to you.
Regards,
Isa Received on Wed Sep 14 2005 - 11:59:15 CDT

Original text of this message

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