NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-112
COPY Command
in-file
is the name (or an equivalent DEFINE) of the table or file from which to copy data.
in-file can be a table, a disk file, a labeled or unlabeled tape, a terminal, or a
process.
out-file
is the name (or an equivalent DEFINE) of the table, file, tape, process, printer,
spooler, or terminal to which to copy the data. If you copy to a file or table, the file
or table must exist before you execute the COPY.
If you omit out-file, SQL uses the current OUT file.
ALLOWERRORS [ ON | OFF | num ]
specifies action when conversion errors occur.
If you omit the ALLOWERRORS clause completely, the default is
ALLOWERRORS OFF. If you specify ALLOWERRORS but do not specify an
option, the default is ALLOWERRORS ON.
Nonconvertible records include records that contain a nonnumeric value in a
numeric field, records that contain a duplicate key value in the primary key field of
the output file, records that are inconsistent with constraints defined for the output
table, and records that contain parity errors. See CONVERT Command
on
page C-89 for more details about rules for data conversion.
COUNT num-records
specifies the number of records to copy. The default is all records.
FIRST { ordinal-record-num }
{ KEY record-spec }
{ KEY key-value }
{ KEY (key-value [, key-value]... ) }
{ key-specifier ALTKEY key-value }
{ key-specifier ALTKEY (key-value }
{ [, key-value ] ... ) }
specifies the starting record of the input file from which to begin copying. If you
omit the FIRST clause, COPY starts with the first record.
The FIRST clause is the same as the FIRST clause in the LOAD command. See
LOAD Command
on page L-17 for a detailed description.
ON Skip nonconvertible records but process subsequent records
OFF Stop the copy operation after the first conversion error
num Skip nonconvertible records until the number of such records exceeds the value
of num. The maximum value for num is 32,767.