Example: Logging Errors With INSERT … SELECT - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
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;