NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
H-6
Host Variables
A host variable can be any valid host language variable that has a corresponding SQL
data type. You can include host variables in many SQL statements and in SQL
expressions. The syntax for a host variable that appears in an SQL statement follows:
host-identifier
is the name of the host variable as declared in the host program; host-
identifier must conform to the naming rules of the host language.
[INDICATOR]:indicator-host-identifier
specifies an indicator variable for handling null values returned to the host variable
or inserting null values into the database through the host variable. See Indicator
Variables and Indicator Parameters on page I-11 for more information.
TYPE AS
indicates that values in the host variable have a date-time or INTERVAL data type.
(SQL interprets such values as character values unless you specify TYPE AS.)
For more complete information about declaring and using host variables, see the
NonStop SQL/MP programming manual for your host language.
:host-identifier[[INDICATOR]:indicator-host-identifier]
[ TYPE AS { DATETIME [ start-dt TO ] end-dt } ]
[ { } ]
[ { DATE | TIME | TIMESTAMP } ]
[ { } ]
[ { INTERVAL start-dt } ]
[ { [ (start-field-precision) ] } ]
[ { [ TO end-dt ] } ]