SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
S-36
Considerations—SET PARAM
COMPUTE_TIMESTAMP (date)
is the Julian timestamp for the date and time you specify in date in this form:
{mm/dd/yyyy }
{mm/dd/yyyy hh:nn:ss:mss:uss}
date cannot be an expression.
Considerations—SET PARAM
SQL determines the data type for a parameter based on how you use the
parameter in an SQL statement. As a result, a literal value you assign to a
parameter might be interpreted differently in different SQL statements.
For example, the string “123” assigned to a parameter might be handled as an
integer, a character string, or an invalid value—depending on whether you use the
parameter in a statement that requires an integer, a character string, or a date-time
value.
Similarly, a parameter that appears to have the value of a string literal with an
associated character set, such as _KANJI”c1c2” (where “c1c2” indicates one
double-byte character) is interpreted as having these value:
For information about the way SQL determines data types for parameters, see
Parameters on page P-11. For information about using the CAST function to
specify a numeric or character data type for a parameter, see CAST Function on
page C-4.
You cannot use parameters in report formatting commands. A method for using
TACL macros to pass parameters to report formatting commands is described in
the SQL/MP Report Writer Guide.
yyyy Year, from 1 through 9999, 1 to 4 digits
mm Month, from 1 through 12, 1 to 2 digits
dd Day, from 1 through 31, 1 to 2 digits
hh Hour, from 0 through 23, 1 to 2 digits
nn Minute, from 0 through 59, 1 to 2 digits
ss Second, from 0 through 59, 1 to 2 digits
mss Millisecond, from 0 through 999, 1 to 3 digits
uss Microsecond, from 0 through 999, 1 to 3 digits
c1c2 if the data type is CHAR(2) CHAR SET KANJI
_KANJI”c1c2” if the data type is CHAR(12)
_K if the data type is CHAR(2)