SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-104
Conversion of DDL Elementary Items
Conversion of DDL Character Strings
Conversion of Binary Data TypesConversion of Decimal Data
Option DDL Data Type SQL Data Type
None PIC A(j)PIC X(j)
PIC X(j)PIC X(j)
PIC N(k)PIC X(m)
TYPE CHARACTER j CHAR(j)
CHARACTER set PIC A(j) CHAR(x)
CHARACTER SET set
PIC X(j) CHAR(x)
CHARACTER SET set
TYPE CHARACTER j CHAR(x)
CHARACTER SET set
NATIONAL set PIC N(k) CHAR(y)
CHARACTER SET set
NATIONAL DEFAULT PIC N(k) NCHAR(k)
set An SQL-supported character set
j The number of single-byte characters
k The number of double-byte characters
m The number of characters in the SQL column; m is two times the corresponding k
x The number of characters; x equals j for single-byte characters sets and equals j/2 for
double-byte character sets
y The number of characters; y equals k for double-byte character sets and equals twice k for
single-byte character sets
DDL NonStop SQL/MP
PIC nines COMP PIC nines COMP or if precision is greater than 9, PIC S
nines COMP
PIC S nines COMP PIC S nines COMP
TYPE BINARY 8 PIC X(1)
TYPE BINARY 8 UNSIGNED PIC X(1)
TYPE BINARY 16 SMALLINT
TYPE BINARY 16 UNSIGNED SMALLINT UNSIGNED
TYPE BINARY 16,scale NUMERIC (4,scale)
TYPE BINARY 16,scale
UNSIGNED
NUMERIC (4,scale) UNSIGNED
TYPE BINARY 32 INTEGER
TYPE BINARY 32 UNSIGNED INTEGER UNSIGNED
nines is: { 9 (int [V9 (scale)] }
{ V9 (scale) }