Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 09 Feb 2010 @ 20:29:03 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Error 2801 in an insert query using left outer join
 
From:   Baig, Mohammad

Hi

This error is coming because you may have duplicate values in T1 of your primary index.

Since you are trying to insert duplicate records in T2 which is Unique primary index you are getting this error.

Scenarios you mentioned.


This will give error if the T1 is having duplicate records of primary index.


Though T1 got NOT NULL values if primary index got duplicates it will get the same error.


This scenario is same as you presented... and it got errore'd


This scenario is same as you presented... and it got errore'd

As kapil mentioned you need to check if you got any duplicate records in primary index of T1 if yes then you have to either change T2 to NUPI or delete the duplicate Records form T1 :-)

     Select A, B, C, COUNT(*)
     FROM T1
     GROUP BY 1, 2, 3 HAVING COUNT(*) > 1

Thanks & Regards



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023