Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

SQL MERGE Detecting Duplicate Rows - forum topic by ruranker

$
0
0

We are using the SQL MERGE statement as a method to perform straight inserts.  When running in Teradata transaction mode, is there a way to detect and log records that do not make it to the target? For example, records that don't get loaded because the target is a SET table and the record already exist or the record violates a USI.
Basically, for audit and control purposes, I need to evaluate the results of a MERGE INSERT any time it does not load the exact source record count even though there are some siutuations in which Teradata returns a zero SQL code.
 

Tags: 
Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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