Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help: many updates
I'm not sure why the respondents see this as such a difficult problem.
The OP asks for one update statement, which IMO is
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)
colA_1 = 'X' or colB_1 = 'Y' or colC_1 = 'Z'
Jaap.
On Sat, 22 Feb 2003 03:57:47 GMT, "charlie cs" <cs3526(no-spam)@yahoo.com> wrote:
>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 Sun Feb 23 2003 - 04:41:03 CST