SQL Programming Manual for TAL
Error and Status Processing
HP NonStop SQL Programming Manual for TAL—527887-001
6-19
Using Literal Declarations for the SQLDA
For a date-time or interval item, bits 0:7 of the DATA^LEN field in the SQLDA contain a
code for the range of date-time fields. Table 6-6
shows the literal declarations defined
to represent these codes.
Table 6-5. Literal Declarations for Character, Numeric, and Decimal Values
Type of Data Value Literal Declaration
Character Data
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
Numeric Data
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
Decimal Data
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
Table 6-6. Literal Declarations for Date-Time and INTERVAL Values (page 1 of 2)
Type of Data Value Literal Declaration
General DATETIME 192 _SQLDT_DATETIME
Literal Declarations for Interval Data Types
YEAR TO YEAR 195 _SQLDT_INT_Y_Y
MONTH TO MONTH 196 _SQLDT_INT_MO_MO
YEAR TO MONTH 197 _SQLDT_INT_Y_MO
DAY TO DAY 198 _SQLDT_INT_D_D
HOUR TO HOUR 199 _SQLDT_INT_H_H
DAY TO HOUR 200 _SQLDT_INT_D_H
MINUTE TO MINUTE 201 _SQLDT_INT_MI_MI
HOUR TO MINUTE 202 _SQLDT_INT_H_MI