I try to run the following code on less than 10,000 lines, but I get
ORA-00001: unique constraint (constraint_name) violated (not unexpected).
UPDATE table1 SET EMAILADRESSE = replace(EMAILADRESSE,'@domain1.no','@domain2.no') WHERE EMAILADRESSE LIKE '%@domain1.no' ;
I tried IGNORE_DUP_KEY, but this is not supported in oracle / SQL * PLUS, as my research shows. Do you have alternatives for me?
IGNORE_DUP_KEY
Another with NOT EXISTS!
NOT EXISTS
UPDATE table1 t1 SET EMAILADRESSE = replace(EMAILADRESSE,'@domain1.no','@domain2.no') WHERE EMAILADRESSE LIKE '%@domain1.no' AND NOT EXISTS (SELECT 'X' FROM table1 t2 WHERE t2.EMAILADRESSE = replace(t1.EMAILADRESSE,'@domain1.no','@domain2.no'));
-, , . EMAILADRESSE . 1, , .
UPDATE table1 SET EMAILADRESSE = replace(EMAILADRESSE,'@domain1.no','@domain2.no') WHERE EMAILADRESSE LIKE '%@domain1.no' AND replace(EMAILADRESSE,'@domain1.no','@domain2.no') NOT IN (SELECT EMAILADRESSE FROM table1)