The following table describes the things to consider when using the INSERT statement.
Topic | Usage Notes |
---|---|
ANSI/SQL DateTime Specifications | The ANSI/SQL DATE, TIME, TIMESTAMP, and INTERVAL DateTime data types in Teradata SQL CREATE TABLE statements can be as column/field modifiers in INSERT statements. You must convert them to fixed-length CHAR data types when specifying the column/field names in the FIELD command. |
Object Restriction | Only one tname object for an INSERT statement can be specified, and it must have been previously identified as a target object in a BEGIN MLOAD command. If the tname object is a view, it must not specify a join. Teradata MultiLoad operates only on single-table commands, so your INSERT statements must not contain joins. |
Required Privilege | To use the INSERT statement, the INSERT privilege must be on the tname table or view. |
Specifying the Applicable DML Statements | One way of specifying the applicable DML statements is to relate each field name to the name of the column to which the field’s data is applied. Another way tells Teradata MultiLoad to apply the first nonfiller field of a record that is sent to the database to the first defined column of the affected table, the second nonfiller field to the second column, and so on. In either case, a value for every column must be specified, either explicitly or by default. |
Using Unicode Data | Do not use the tname.* version of an INSERT statement when using Unicode data from:
These functions return the field names from the referenced tables and return byte/character counts that Teradata MultiLoad uses internally to construct the USING clause for the subsequent load operation. The internally generated USING clauses do not properly reflect the structure of the input data stream because of the byte-count and character-count conversions that occur when importing and exporting CHAR and VARCHAR data between the client system and the database. |