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

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-75
Examples of MXCI Parameters
Examples of MXCI Parameters
The PROJECT table has a START_DATE column. This UPDATE statement uses
the character literal in the ?STARTDAY parameter to set the START_DATE column
value in the PROJECT table:
SET PARAM ?STARTDAY '1999-11-15';
UPDATE persnl.project
SET start_date = CAST(?STARTDAY AS DATE);
Suppose that the PROJECT table has an EST_COMPLETE column whose default
value is INTERVAL '30' DAY. This UPDATE statement uses the numeric literal in
the ?EST parameter to update the EST_COMPLETE column value in the
PROJECT table:
SET PARAM ?EST 60;
UPDATE persnl.project
SET est_complete = CAST(?EST AS INTERVAL DAY);