Correct Errors in the Second Error Table | Teradata FastLoad - Procedure for Correcting Errors in the Second Error Table - FastLoad

Teradata® FastLoad Reference

Product
FastLoad
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-18
dita:mapPath
ije1544831946874.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2411
lifecycle
previous
Product Category
Teradata Tools and Utilities
Use the following procedure to correct errors recorded in the error table specified as errortname2:
  1. Use the following Teradata SQL statement to retrieve all rows from the second error table:

    SELECT * FROM errortname2 ORDER BY cname ;

    where the following is true:
    Syntax Element Description
    cname Unique primary index for the table
    errortname2 Name of the second error table

    The BTEQ response is a list of the contents of the second error table, ordered by the values in the primary index column.

  2. Use the following Teradata SQL statement to retrieve each row from the Teradata FastLoad table that has a primary index value identical to a row retrieved from the second error table:

    SELECT * FROM tname WHERE cname = errorvalue

    where the following is true:
    Syntax Element Description
    cname Index of the Teradata FastLoad table
    errorvalue Index value retrieved from the second error table
    tname Name of the Teradata FastLoad table
  3. Compare the rows selected from the error table with the rows selected from the Teradata FastLoad table and determine which is correct.
    • If the row selected from the error table is correct, then use a Teradata SQL DELETE statement to delete the incorrect row from the Teradata FastLoad table, and an INSERT statement to insert the correct row.
    • If the row selected from the Teradata FastLoad table is correct, then use a Teradata SQL DELETE statement to delete the corresponding row from the error table.
  4. Repeat Steps 2 and 3 until all rows in the error table are accounted for.
  5. Drop the errortname2 table from the database after all errors have been resolved.