SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
L-44
Considerations—LOAD
The value 7,201 for the year 1993 is obtained by dividing by 256 and using 
remainders, as described in the preceding binary column discussion.
To specify a value for an INTERVAL column, first determine the number of 
bytes required. Find the entry for the column in the COLUMNS catalog table. 
Do not use INVOKE output; this does not describe the internal representation 
of the column. Next, form the value as described for SMALLINT, INTEGER, or 
LARGEINT columns, expressed as a multiple of the smallest unit in the 
interval.
To specify a value for a floating point column, you must convert the floating 
point value into a series of bytes. One way to do this is to write a program that 
redefines a floating point variable as an array of bytes. Store the desired 
floating point value into the variable, and then use the byte values from the 
array of bytes for the FIRST KEY specification.
Using the FIRST key-specifier ALTKEY option
These considerations apply to the use of the FIRST key-specifier ALTKEY 
option:
For nonunique alternate keys, the key includes the primary key after the last 
column of the alternate key. You do not need to include primary key values in 
your specification unless you want to include enough of the primary key value 
to distinguish a specific row.
To specify the value of an alternate key columns that is nullable, include two 
bytes with the value 0 (for the null indicator), followed by the internal 
representation for the alternate key value as described previously in Using the 
FIRST KEY Option.
This example specifies an alternate key value of “KAQB” for a nullable PIC 
X(4) column:
FIRST keyspec ALTKEY (0,0,"KAQB")
To specify a null alternate key value, include two bytes with the value 255 
followed by as many bytes with value 0 as needed to complete the column 
value.
This example specifies an null value for a nullable PIC X(4) alternate key 
column:
FIRST keyspec ALTKEY (255,255,0,0,0,0)
Using FIRST and PARTONLYIN options
If both FIRST and PARTONLYIN options are used together, only the FIRST option 
is executed. The PARTONLYIN option is ignored. To achieve results from both 
options in LOAD or APPEND commands, first load the source table with the 
PARTONLYIN option to a new table having the same schema, and then load or 
append the new table with the FIRST option to the original target table.
Using SHARE and PARTONLYIN options










