Need a bit of help on a query for Oracle. Basically I would like to put together a query that updates a number of columns to replace actual data with test data. To do this we need to do things like change project codes in two tables, but the references must match, so for example I'm looking to do...
UPDATE table1 t1, table2 t2
SET t1.project_ref = concat('projectRef-',rownum),
t2.project_ref = t1.project_ref
WHERE t1.project_ref = t2.project_ref and t1.project_client = XYZ
This would change t1.project_ref and t2.project_ref to something like 'projectRef-1' for client XYZ.
Any ideas?
Regards
KS