what does this error mean?

Database
N/A

what does this error mean?

error: Target row updated by multiple source rows

on executing the following update stmt ;

i am getting the above error

update target_tbl T --> this table is a set table
from
(
derived table --> this table returns unique values
)d

where T.a=d.a
and T.b=d.b
3 REPLIES

Re: what does this error mean?

it means that even though the rows in the derived table are unique, the fields used in the where clause are not enough to uniquely identify the row in the target table. Try adding additional fields ( the logical key) if that uniely identifies a row
Teradata Employee

Re: what does this error mean?

It means that though rows in the derived table may be unique, the combination of join columns (a,b) is not.

SELECT a, b from
(
derived table --> this table returns unique values
)d
GROUP BY a, b
HAVING COUNT(*) > 1;
N/A

Re: what does this error mean?

Thank you