Utilities 7-23
How to Create a Command File
Two consecutive delimiters define a null field. As a precaution, you might
wish to place a delimiter immediately before theNEWLINE character that
marks the end of each data row. If you omit this delimiter, an error results
wheneverthe last field of a data row is empty. If you are certain that none of
the input data rows ends with an empty field, you can omit this step.
The following example command file illustrates a simple delimiter form of
the FILE and INSERT statements. The three input data files,stock.unl,
customer.unl,and manufact.unl (from stores5) were createdby the UNLOAD
statement. (To see the.unl input data files, refer to the directory
$INFORMIXDIR/demo/product_name.)
FILE stock.unl DELIMITER "|" 6;
INSERT INTO stock;
FILE customer.unl DELIMITER "|" 10;
INSERT INTO customer;
FILE manufact.unl DELIMITER "|" 3;
INSERT INTO manufact;
Delimiter Form INSERT Statement
TheINSERT statement within dbload cannot incorporate a SELECT statement.
The user who executesdbload with this command file must have Insert
privilege on the named table. The syntax for the delimiter form of the
INSERT statement can be represented as follows:
Valid syntax for thedbload VALUES clause includes constants, literal
numbers, and functions as described inIBM I nformix Guide to SQL: Reference.
You can also use the sequential field names automatically assigned by
dbload (f01,f02,f03, and so on) from theFILE statement.
column name is the column that receives the new data.
table name isthe name of the table that receives the data. The table name
can include the owner name but cannot include a database
server name.
,
column
name
INSERT
INTO ;
( ) Restricted
Values Clause
tablename