SQL Programming Manual for Pascal

Error and Status Processing
HP NonStop SQL Programming Manual for Pascal528614-001
6-19
Data Type Literals
Table 6-5 and Table 6-6 on page 6-20 list the literals.
For a date-time or interval item, bits 0 through 7 of the data_len field in the SQLDA
contain a code for the range of date-time fields. Table 6-6 on page 6-20 shows the
literal declaration defined to represent these codes.
Table 6-5. Data Type Values and Literal Declarations
Character Data
Type of Data Value Pascal Literal
ASCII (fixed-length string) 0 SQLDT_ASCII_F
ASCII (fixed-length string, upshifted) 1 SQLDT_ASCII_F_UP
ASCII (variable-length string) 64 SQLDT_ASCII_V
ASCII (variable-length string, upshifted) 65 SQLDT_ASCII_V_UP
Maximum CHARACTER type 127
Numeric Data
Type of Data Value Pascal Literal
Minimum NUMERIC type 128
16-bit signed (signed SMALLINT) 130 SQLDT_16BIT_S
16-bit unsigned (unsigned SMALLINT) 131 SQLDT_16BIT_U
32-bit signed (signed INT) 132 SQLDT_32BIT_S
32-bit unsigned (unsigned INT) 133 SQLDT_32BIT_U
64-bit signed (signed LARGEINT) 134 SQLDT_64BIT_S
32-bit floating point 140 SQLDT_REAL
64-bit floating point 141 SQLDT_DOUBLE
Maximum NUMERIC type 134
Decimal Data
Type of Data Value Pascal Literal
Minimum DECIMAL type 150
Unsigned DECIMAL 150 SQLDT_DEC_U
DECIMAL, leading sign separate (not SQL type) 151 SQLDT_DEC_LSS
ASCII DECIMAL, leading sign embedded 152 SQLDT_DEC_LSE
DECIMAL, trailing sign separate (not SQL type) 153 SQLDT_DEC_TSS
DECIMAL, trailing sign embedded (not SQL type) 154 SQLDT_DEC_TSE
Maximum DECIMAL type 154