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: Update a Unique Row

Re: Update a Unique Row

From: cbantzer <christian_bantzer_at_psmfc.org>
Date: Tue, 18 Jan 2000 07:44:53 -0800
Message-ID: <38848A75.1D7FCD1@psmfc.org>


First it seems like your table could use an integrity constraint to avoid this from happening again.
but before you can implement that you will need to fix the duplicate.

You can access each record individually by its rowid

try this:

select rowid from tab_A where .... (match the 2 duplicate records)

you can use either one of the returned values to fix your duplicate.

update tab_A

   set (...) = subquery
 where rowid = 'whateveryou got back'

Christian

jeanch_at_my-deja.com wrote:
>
> Hi folks,
>
> I have got in the table tab_A two entries ent_1 and ent_2 that are
> identical; I want to be able to update only one (ent_1)
> of those and leave the other entry (ent_2) untouched;
> Does anybody knows how to do it please ?
> Thanks for your help.
> Cheers
> JC
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Jan 18 2000 - 09:44:53 CST

Original text of this message

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