SQL Programming Manual for TAL

Host Variables and Parameters
HP NonStop SQL Programming Manual for TAL527887-001
2-26
Using Default Parameter Data Types
Using Default Parameter Data Types
If the TYPE AS clause is omitted from a dynamic SQL statement that uses date-time or
INTERVAL data types with parameters, NonStop SQL assigns a default data type to a
parameter as follows:
For more information about parameters in dynamic SQL statements, see Section 7,
Dynamic NonStop SQL Operations. For examples that use parameters in dynamic
SQL statements, see Appendix C, Examples of Dynamic NonStop SQL Programs.
INTERVAL The parameter name is followed by a range of fields and start-
field-precision is specified.
DATETIME The parameter name is followed by a range of fields and start-
field-precision is not specified
DATETIME The expression takes any of these forms:
parameter-name { + | - } interval-term
interval-expression + parameter-name
date-time-expression - parameter-name
NUMERIC The expression takes any of these forms:
parameter-name { + | - } scalar-value
{ + | - } parameter-name