NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-36
Considerations—LOAD
°
The field must not be a filler field.
°
LOAD ignores Level-88 CONDITION-NAME clauses and Level-66
RENAMES clauses.
°
Unless you specify a REDEFINE clause in the REDEFINE option of the LOAD
command, LOAD ignores the clause and uses the original field definition.
Data type compatibility and field conversions
If you are loading data from an Enscribe file or SQL table into an Enscribe file or
SQL table, the data type (including the character set) of each source field or column
must be compatible with the data type of the corresponding target field or column.
Character fields are compatible if the associated character sets are compatible (as
described previously in this entry) and if the target field or column is large enough
to hold the values loaded from the source field. If you specify TRUNCATION ON,
the latter part of this requirement is always met.
If you do not specify TRUNCATION ON and a source field has a fixed-length
character data type, LOAD can determine whether the source field is compatible
with the target field prior to loading actual data. However, if a source field has a
variable-length character data type, compatibility between the source and target field
depends on the actual length of the specific records or rows in the source data. In
this case, LOAD returns an error if it encounters an incompatible record during the
actual loading.
Except for the Enscribe types COMPLEX and LOGICAL, any numeric field is
compatible with any other numeric field as long as the target field is large enough to
hold the values from the source field.
When you load between an SQL table and a non-SQL object (in either direction)
and do not provide a DDL record for the Enscribe file, LOAD converts data types as
follows:
SQL Data Type Enscribe Data Type
CHAR (n) PIC X(n)
CHAR VARYING (n) 02 A-VARCHAR
03 LEN PIC S9(4) COMP
03 VAL PIC X(n)
DECIMAL DECIMAL SIGN LEADING SEPARATE
DOUBLE PRECISION FLOAT 64
NUMERIC Equivalent scaled binary (such as BINARY 32
SCALE 2)
REAL FLOAT 32
REAL precision
if precision is from 1 to 22
FLOAT 32
REAL precision
if precision is from 23 to 54
FLOAT 64
FLOAT Equivalent FLOAT (such as FLOAT 64)