Re: Update problems ...

From: Yves Raisin <ra_at_ofisa.ch>
Date: 1995/07/27
Message-ID: <DCDznG.4MC_at_eunet.ch>#1/1


Hi Jack,
one thing you can do is a select like this to find rows with serial_number equal rtrim(serial_number) on other rows :

SELECT a1.serial_number,a2.serial_number   FROM ammo a1,ammo a2
 WHERE rtrim(a2.serial_number) = a1.serial_number Hope that's help you

Yves

jalford_at_immcms1.redstone.army.mil (jack) wrote:

>Hello all,
 

>I am trying to update a table with the statement below, I understand the
>problem, but I don't know how to find it since the table has 60,000 rows.
>Any suggestions ??

> update ammo set serial_number= rtrim(serial_number)
> where serial_number != rtrim(serial_number);
 

>ERROR at line 1:
>ORA-00001: unique constraint (AMMO.PRIMARY_KEY_AMMO) violated

>Thank you for your time...
 

> - jack

Yves Raisin                                     tel   : +41 21 341 81 11
Ofisa Informatique                              fax   : +41 21 341 84 57
Chemin des Charmettes 7                         e-mail: ra_at_ofisa.ch
CH 1003 Lausanne - Switzerland Received on Thu Jul 27 1995 - 00:00:00 CEST

Original text of this message