MVSTeradata
Programmer
I have 3 tables T375, T378 and T350.
T375 - A1,B1,C1,D1.
the rest of the fields E1,F1 ...etc are not UPI's.
T378 - A1,B1,C1,D1
The rest of the fields E3, F3 are not UPI's and are derived from T375.This table is a child of T375 with the same UPIs.
T350 - A2,B2,C2,D2,E2,F2,G2
The rest of the fields H2,I2 ...etc are not UPI's.
The only way to join T375 and T350 is on other fields
that are not unique.This is the join condition.
substr(A2,1,8) = A1
and B2 = B1
and C2 = E1
This join returns a lot of duplicates.
I need to update T378.E3 field based on the above join condition between T375 and T350.
Whenever i try to update error message says
"Target row updated by more than one source rows"
I need a way to get rid of the duplicates that are returned from the join. I need to update T378 based on the above match. Can someone please come up with a way to weed out the duplicate records.I just need one record returned irrespective of any other conditions.
I will really appreciate all the help that i can get on this one.
Thanks
T375 - A1,B1,C1,D1.
the rest of the fields E1,F1 ...etc are not UPI's.
T378 - A1,B1,C1,D1
The rest of the fields E3, F3 are not UPI's and are derived from T375.This table is a child of T375 with the same UPIs.
T350 - A2,B2,C2,D2,E2,F2,G2
The rest of the fields H2,I2 ...etc are not UPI's.
The only way to join T375 and T350 is on other fields
that are not unique.This is the join condition.
substr(A2,1,8) = A1
and B2 = B1
and C2 = E1
This join returns a lot of duplicates.
I need to update T378.E3 field based on the above join condition between T375 and T350.
Whenever i try to update error message says
"Target row updated by more than one source rows"
I need a way to get rid of the duplicates that are returned from the join. I need to update T378 based on the above match. Can someone please come up with a way to weed out the duplicate records.I just need one record returned irrespective of any other conditions.
I will really appreciate all the help that i can get on this one.
Thanks