Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help: many updates
"Jaap W. van Dijk" <j.w.vandijk.removethis_at_hetnet.nl> wrote in message
news:hu8h5voa8ihokd5oovqisak11ddin4odo8_at_4ax.com...
> 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)
> where
> colA_1 = 'X' or
> colB_1 = 'Y' or
> colC_1 = 'Z'
>
> Jaap.
Hi Jaap,
I agree it's a relatively simple question (and solution) but let's give poor John some credit in that as "an earlier respondent" he provided the exact same solution as yourself, with exactly the same error !!
It's 'UPDATE TEST', not 'UPDATE *table* TEST'
But you both got the tricker bit right ;)
Cheers
Richard Received on Sun Feb 23 2003 - 06:35:50 CST