SQL/MX 2.x Reference Manual (H06.04+)

MXCI Commands
HP NonStop SQL/MX Reference Manual540440-003
4-47
SET PARAM Command
SET PARAM Command
Considerations for SET PARAM
Examples of SET PARAM
The SET PARAM command is used to set a parameter value within an MXCI session.
The value is used for queries that contain the associated parameter name. A separate
SET PARAM is required for each parameter. See MXCI Parameters on page 6-73.
You can use SET PARAM only within an MXCI session.
?param-name
is the name of the parameter for which the value is specified. Parameter names
are case-sensitive—for example, the parameter ?pn is not equivalent to the
parameter ?PN. \
char-set-name
is the character set name, preceded by an underscore (_) character. Valid values
are ISO88591, UCS2, KANJI or KSC5601. If you do not enter char-set-name,
the default is ISO88591.
You can use an ISO88591 param in an SQL query as a non-character typed value
(such as int). You can use a UCS2 param in an SQL query as either a non
character typed value or an ISO88591 value. You can use a param with a
character set that you have specified as a character value in an SQL query where
the character value is expected to be of that character set.
param-value
is a numeric or character literal that specifies the value for the parameter. If you
specify char-set-name, you must enclose param-value in single quotes.
Otherwise, if param-value is a character literal and the target column is
character, you do not have to enclose it in single quotation marks; its data type is
determined from the data type of the column to which the literal is assigned. If you
do not specify a value, NonStop SQL/MX uses a string with a length of zero for the
parameter. You can enter the value in hexadecimal format.
NULL
represents the null value. You must enter it in uppercase letters.
SET PARAM ?param-name [[_char-set-name] param-value | NULL]