The sql statement below is throwing an error:
ORA-01427: single-row subquery returns more than one row
UPDATE TABLE_1 T1
SET ( COL1, COL2, COL3, COL4) = (
SELECT col1
, col2
, col3
, col4
FROM TEMP_TABLE_2 tt2
WHERE tt2.COL_XYZ = t1.COL_XYZ)
WHERE EXISTS ( select null
FROM TEMP_TABLE_2 tt2
WHERE tt2.COL_XYZ = t.COL_XYZ);
I believe the issue is on the "Where exists" because I know the inner select query returns only one row for a given COL_XYZ record.
Any ideas?