Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: many updates
Sure, you can do this:
update table test set colA = decode(colA_1,'X','A',colA), colB = decode(colB_1,'Y','B',colB), colC = decode(colC_1,'Z','C',colC) where colA_1='X' or colB_1='Y' or colC_1='Z'
John
"charlie cs" <cs3526(no-spam)@yahoo.com> wrote in message
news:%yC5a.4661$_J5.1250_at_nwrddc01.gnilink.net...
> We are using 9.2.
> We need to update a big table like this
>
> SQL> update table test set colA='A' where colA_1='X';
> SQL> update table test set colB='B' where colB_1='Y';
> SQL> update table test set colC='C' where colC_1='Z';
>
> .....
>
> Is there any way we can do this in one sql, instead of making several
> database calls?
>
> Thanks for you help.
>
>
Received on Sat Feb 22 2003 - 11:03:45 CST