SQL/MX 2.x Installation and Management Guide (H06.04+)
Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide—540436-001
10-31
Examples of Using import to Load an SQL/MX Table
7,"Test String 7","111-222-3333","222-333-4444"
8,"Test String 8","111-222-3333","222-333-4444"
Format File Describing the Data
Create a format file, FORMFILE1, which consists of [DATE FORMAT], [COLUMN
FORMAT], and [DELIMITED FORMAT] sections:
[DATE FORMAT]
DateOrder=MDY
DateDelimiter=/
TimeDelimiter=:
FourDigitYear=Y
DecimalSymbol=.
[COLUMN FORMAT]
col=id,N
col=company,N
col=phone,N
col=fax,N
[DELIMITED FORMAT]
FieldDelimiter=,
RowDelimiter=\n
Qualifier="
import Load Command
This import command imports data into the target table COMPANY from the
delimited input file COINPUT using the format file FORMFILE1:
import cat.sch.company -I coinput -U formfile1 -W DELIM
Example 2: Importing Data From a Fixed Width File
This example of an import from a fixed width file shows the data to be loaded (the input
data file), the format file describing the data, and the import command used to load it.
Data to Input
The input file, COINPUT_FX, contains records like this:
00000000001,"Test String 3456","111-222-3333","444-555-6666"
00000000002,"ibm ","408-111-2222","408-222-3333"
00000000003,"apple ","408-222-1111","408-333-2222"
00000000004,"tandem ","408-285-5000","408-285-2227"
00000000005,"diyatech ","510-111-2222","510-222-3333"










