Archives of the TeradataForum
Message Posted: Mon, 08 Feb 2010 @ 14:01:07 GMT
I am using an insert query with left outer join condition as below:
Insert into T2 Select T1.D,T1.A, T1.B, T1.C From T1 Left outer joinT2 ON T1.A=T2.A T1.B=T2.B T1.C=T2.C Where T2.D is null;
Table T1 has 100 rows and T2 is empty
T1 has NOT NULL values for A,B,C and D
T1 has primary index with columns A,B and C
T2 has unique primary index with columns A,B and C
Now when I run this query, I get an error as "2801 Duplicate unique prime key error in T2"
Since the target table is empty, I am confused on how I could get a duplication error over there. Kindly help me out.
Thanks in advance,
|Copyright 2016 - All Rights Reserved|
|Last Modified: 15 Jun 2023|