SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-116
COPY Command
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. For more information about rules for
data conversion, see CONVERT Command on page C-94.
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-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. For
information, see LOAD Command
on page L-18.
REPLACE SPACES WITH { ZERO[ES] | DEFAULT[S] }
specifies how to copy an Enscribe ASCII numeric decimal field containing all
blanks to an SQL numeric column. (Does not apply to Enscribe numeric binary
fields)
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.
ZEROES sets the target column to 0
DEFAULTS sets the target column to its default value