NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-113
COPY Command
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)
If you do not specify this option for an Enscribe ASCII numeric decimal field, a
conversion error occurs for any record in which the field contains blanks.
UNSTRUCTURED
(for copying from a table or disk file only) directs COPY to treat the data as a
sequence of bytes, ignoring any record structures normally recognized for the table
or file. The UNSTRUCTURED option lets you examine only one partition of a
partitioned table or file.
UPSHIFT
(for copying to an Enscribe file only) converts all bytes of the input that contain
lowercase ASCII characters to uppercase ASCII characters before copying the data
to the target record.
The UPSHIFT conversion is made without regard to the data types of fields or
columns of the input, so undesired changes to the data can occur if you use
UPSHIFT with input that is not composed of simple character data.
Though you cannot specify the UPSHIFT option if out-file is an SQL table, data
moved to an SQL column that has the UPSHIFT attribute is automatically upshifted.
USESQLNULLS
(for copying from Enscribe files to SQL tables only) specifies that a null value from
an Enscribe file be copied as an SQL null value.
USESQLNULLS applies only if the SQL column being copied to allows null
values, if you also specify the SOURCEREC option, and if the Enscribe null value
appears in every byte of the Enscribe field. (Enscribe allows you to specify a
character to use as the “null character” for a field at file-creation time, then uses that
character to represent null values within the field. Any field that is filled entirely
with the null character is treated as null.)
If you omit USESQLNULLS, COPY provides no special treatment for Enscribe null
characters.
in-option
specifies characteristics of the input file. It is identical to the in-option for the
LOAD command. See LOAD Command on page L-17 for a description of in-
option clauses.
ZEROES sets the target column to 0
DEFAULTS sets the target column to its default value