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

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-139
SESSION_USER Function
SESSION_USER Function
The SESSION_USER function returns the current Guardian user ID as variable-length
character data in the form group.name.
The SESSION_USER function is equivalent to the CURRENT_USER Function on
page 9-37 and the USER Function on page 9-165
Examples of SESSION_USER
Use SESSION_USER to display the current session user:
SELECT SESSION_USER FROM logfile;
(EXPR)
-----------------------
DCS.TSHAW
...
--- 5 row(s) selected.
SIGN Function
The SIGN function returns an indicator of the sign of a numeric value expression. If the
value is less than zero, the function returns -1 as the indicator. If the value is zero, the
function returns 0. If the value is greater than zero, the function returns 1.
SIGN is an SQL/MX extension.
numeric-expression
is an SQL numeric value expression that specifies the value for the argument of
the SIGN function. See Numeric Value Expressions on page 6-48.
Examples of SIGN
Return the value –1:
SIGN (-20 + 12)
Return the value 0:
SIGN (-20 + 20)
Return the value 1:
SIGN (-20 + 22)
SESSION_USER
SIGN (numeric-expression)