SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide544536-007
10-36
Examples of Using import to Load an SQL/MX Table
col=col1
[FIXED WIDTH FORMAT]
FileIsBinary=N
RecordLength =5
col=col1,1,5
import Load Command
This import command imports data into the target table TABLE_2 from the delimited
input file COINPUT_FX3 using the format file FORMFILE3:
import cat.sch.table_2 -I coinput_fx2 -U formfile3 -W FIXED
Example 4: How to use new options and analyze the output
files
This example describes how to use new options and analyze the output files. It shows
how to create the table, the data to be entered (the input data file), and the output files.
create table cat.sch.Xample ( C1 int NOT NULL PRIMARY KEY ,C2
char(8) NOT NULL,CONSTRAINT cnd1 CHECK (c1 > 5) );
Data to Input
The input file, X.in, contains records like this:
11,12345678
A8,22345678
11,82345678
14,423456789
17,52345678,9
15,62345678
27,72345678
5,32345678
BZ,XYZ
55,12345678
After executing the command:
import cat.sch.Xample -i X.in -L 50 -E X.perrs -PM X.perrmsg \
XL 5 -XE X.xerrs -XM X.xerrmsg \ -SF X.sum -SI 10
The following output must be displayed:
NonStop SQL/MX Import Utility 2.3
(c) Copyright 2007 Hewlett-Packard Development Company, LP.
Rows Imported = 4
Import Completed with some non-fatal errors