SQL/MX 2.x Installation and Management Guide (H06.04+)

Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide540436-001
10-33
Using import to Append Data to Tables or Partitions
Data to Input
The input file, COINPUT_FX2, contains records like this:
0123456789012345
ABCDEFGHIJKLMNPQ
0123456789012345
Note that there are three hidden spaces and a newline character at the end of each
line.
Format File Describing the Data
Create a format file, FORMFILE3, which consists of [DATE FORMAT], [COLUMN
FORMAT], and [FIXED WIDTH FORMAT] sections:
[DATE FORMAT]
NormalizeDate = y
[COLUMN FORMAT]
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
Using import to Append Data to Tables or Partitions
Use the import command to append data to the end of a table or partition of an
SQL/MX table.
The import command preserves the existing data in the target table.
When you use the import command in an DSS environment, you can keep a data
warehouse up to date by performing periodic (for example, daily, weekly, or monthly)
updates to the database.
Use the import command to append data to multiple partitions of a table. The
DataLoader/MX product can help you streamline this task. DataLoader/MX is a
nonprivileged batch program that provides a library of command routines for loading
and maintaining SQL/MX tables. DataLoader/MX can be customized to perform
data-format transformation while using the import utility for append operations. For
more information about the DataLoader/MX product, see the DataLoader/MX
Reference Manual.