Example: Logging Errors with INSERT ... SELECT - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™

The following examples show various types of error logging with INSERT ... SELECT requests:

The following request logs all data, referential integrity, and USI errors to the default limit of 10 errors.

     INSERT INTO t
     SELECT *
     FROM s
     LOGGING ERRORS;

The following request logs all data, referential integrity, and USI errors to the default limit of 10 errors.

     INSERT INTO t
     SELECT *
     FROM s
     LOGGING ALL ERRORS;

The following request logs data, referential integrity, and USI errors with no error limit. This does not mean that there is no limit on the number of errors the system can log; instead, it means that errors will continue to be logged until the system-determined limit of 16,000,000 have been logged. See CREATE ERROR TABLE in Teradata Vantage™ - SQL Data Definition Language Detailed Topics, B035-1184.

     INSERT INTO t
     SELECT *
     FROM s
     LOGGING ERRORS WITH NO LIMIT;

The following request logs data row, referential integrity, and USI errors to a limit of 100 errors.

     INSERT INTO t
     SELECT *
     FROM s
     LOGGING ERRORS WITH LIMIT OF 100;