Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Error 2803 Secondary index uniqueness violation error utf-8 impact? - response (1) by dnoeth

$
0
0

Are you shure the duplicate is not in your staging table?

sel COUNTRY_ISO_A2 ,CITY_TXT ,ZIP_CODE 
from staging 
group by 1 
having count(*) > 1

And to find out which rows might cause that error:

sel COUNTRY_ISO_A2 ,CITY_TXT ,ZIP_CODE from staging
intersect
sel COUNTRY_ISO_A2 ,CITY_TXT ,ZIP_CODE from target

If those queries don't return any rows, it might be due to some rules for comparing strings in UTF?
To find out which rows caused the error you could create a copy of the target table with a UPI on those columns, do a CREATE ERROR TABLE and then use a MERGE or INS/SEL with LOGGING ALL ERRORS. Thus there's no unspecific "a row caused an error", but the rows are recorded within the error table.
Dieter


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>