SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
P-12
Parameters
This diagram shows how to specify a parameter in a DML statement or SQLCI
command file. For information about assigning values to parameters, see EXECUTE
Statement on page E-7 or SET PARAM Command on page S-35.
?[param-name]
specifies a parameter and, optionally, a name for the parameter. The name must
be an SQL identifier.
[ INDICATOR ] ?[indicator-param]
specifies an indicator parameter to use for inserting null values into the database
through the parameter, or for handling null values that might be returned to the
parameter in host programs. (An indicator parameter with a value less then 0
indicates a null value; an indicator parameter with a value of 0 indicates a nonnull
value.)
An indicator parameter has the same format as the parameter it is associated with.
For information on handling null values in dynamic SQL programs, see the
SQL/MP programming manual for your host language.
?[param-name] [ [ INDICATOR ] ?[indicator-param] ]
[TYPE AS {DATETIME [start-dt TO] end-dt }]
[ {DATE }]
[ {TIME }]
[ {TIMESTAMP }]
[ {INTERVAL start-dt }]
[ { [ (start-field-precision) ] }]
[ { [ TO end-dt ] }]
start-dt and end-dt are:
{ YEAR }
{ MONTH }
{ DAY }
{ HOUR }
{ MINUTE }
{ SECOND }
{ FRACTION [ (precision) ] }
Only end-dt can include the precision option for the
FRACTION field.