Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I use N different where clauses in a single update statement?
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