IBM 000-8697 User Manual

Page of 702
7-30
IBM Informix OnLine Database Server Administrator’s Guide
How to Create a Command File
The
FILE
 statement defines six data fields from the cust_loc_data table data
rows. The statement names the fields and defines the length of each field
using character positions. Compare the
FILE
 statement in the preceding
example with the following example data rows:
1234567890123456789012345678901234
Sunnyvale++++++CA94086408-789-8075
Tempe++++++++++AZ85253xxx-xxx-xxxx
The
FILE
 statement defines the following six data fields derived from these
data rows:
The null strings defined for the state and area_cd fields generate the null
values in those columns but do not affect the values stored in the state_area
column.
The INSERT
statement uses the field names and values derived from the
FILE
statement as the value-list input. Consider the first
 INSERT
 statement in the
character-position example:
INSERT INTO cust_address (col1, col3, col4)
VALUES (city, state, zip);
Column
Values from Row 1
Values from Row 2
city
Sunnyvale++++++
Tempe++++++++++
state
CA
AZ
area_cd
408
null
phone
408-789-8075
null
zip
94086
85253
state_area
CA408
AZxxx