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: newbie -> question on how-to replace the value in a column

Re: newbie -> question on how-to replace the value in a column

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Thu, 18 Apr 2002 16:53:10 +0200
Message-ID: <3CBEDDD6.5852DA3@mytoys.de>


> I have a tool for analyses that creates an oracle-database.
> Looking in table A, I can see that the values in column A1 are wrong - the
> values were inserted in column A2.
> This messes up the analyses when looking at the values.
>
> So, what I would like to do - is somehow to select the values in column A2
> and insert them into A1.
> Is it hard to do ?

Do you want to swap A1 and A2 or just copy A2 over A1?

Do you have a unique column?

If e.g. A3 is unique you can do the following:

UPDATE A SET A1=A2, A2=A1 WHERE A3=A3; which swaps A1 and A2.

Regards,

Knut Received on Thu Apr 18 2002 - 09:53:10 CDT

Original text of this message

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