Utilities 7-29
How to Create a Command File
The restrictionsdbload imposes on the VALUES clause value list affect only
datatypes DATE,DATETIME, and INTERVAL.Values of type DATEmust be in
mm/dd/yyyy format. (This is the case if the DBDATE environment variable is
setto its default value, MDY4/.) Data for DATETIME and INTERVAL columns
mustbe in character form, showing only field digits and delimiters (no type
or qualifiers).
Inserted data types correspond to the explicit or default column list. If the
datafield width is different from its corresponding character column width,
thedata is made to fit. That is, inserted values are padded with blanks if the
data is not wide enough for the column, or are truncated if the data is too
wide for the column.
Ifthe number of columns named is fewer than the number of columns in the
table,dbload inserts the default value specified for the unnamed columns. If
no default is specified,dbload attempts to insert a null value. If the attempt
violatesa NOT NULL restriction or a unique constraint, the insert fails and an
error message is returned.
Ifthe INSERT statement omits the column name(s), the default INSERT speci-
ficationis every column in the named table. If the INSERT statement omits the
VALUESclause, the default INSERT specification is every field of the previous
FILE statement.
Anerror results if the number of column names listed (or implied by default)
does not match the number of values listed (or implied by default).
Character-Position Statement Examples
Thefirst FILE and INSERT statement set in the character-position example on
page 7-26 is repeated here:
FILE cust_loc_data
(city 1-15,
state 16-17,
area_cd 23-25 NULL = "xxx",
phone 23-34 NULL = "xxx-xxx-xxxx",
zip 18-22,
state_area 16-17 : 23-25);
INSERT INTO cust_address (col1, col3, col4)
VALUES (city, state, zip);