NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-57
COMPUTE_TIMESTAMP Function
department 1500 and whose salary is less than the minimum salary determined by
the first outer subquery.
SELECT FIRST_NAME, LAST_NAME
FROM PERSNL.EMPLOYEE
WHERE DEPTNUM <> 1500 AND
SALARY < (SELECT MIN (SALARY) FROM PERSNL.EMPLOYEE
WHERE DEPTNUM <> 1500 AND
SALARY > (SELECT AVG (SALARY) FROM
PERSNL.EMPLOYEE
WHERE DEPTNUM = 1500) )
COMPUTE_TIMESTAMP Function
COMPUTE_TIMESTAMP is an SQLCI function that returns a Julian timestamp for a
specified date and time. The data type of the returned value is NUMERIC(18) or
LARGEINT.
COMPUTE_TIMESTAMP works in the report writer commands BREAK FOOTING,
BREAK TITLE, DETAIL, PAGE FOOTING, PAGE TITLE, REPORT FOOTING, and
REPORT TITLE. It also works in the SQLCI commands EXECUTE and SET PARAM.
COMPUTE_TIMESTAMP does not work in DML statements or other SQL statements.
Considerations—COMPUTE_TIMESTAMP
Restrictions on arguments
If you use one of the first two forms of the argument, the argument must appear on a
single input line.
{mm/dd/yyyy }
{ }
COMPUTE_TIMESTAMP ( {mm/dd/yyyy hh:nn:ss:mss:uss} )
{ }
{yyyy, mm, dd }
{ [,hh,nn,ss,mss,uss] }
yyyy Year (1 through 3999, 1-4 digits)
mm Month (1 through 12, 1-2 digits)
dd Day (1 through 31, 1-2 digits)
hh Hour (0 through 23, 1-2 digits)
nn Minute (0 through 59, 1-2 digits)
ss Second (0 through 59, 1-2 digits)
mss Millisecond (0 through 999, 1-3 digits)
uss Microsecond (0 through 999, 1-3 digits)