HP Neoview SQL Reference Manual page 264

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

The next example uses these values in the PROJECT table:
PROJCODE
1000
2000
2500
3000
4000
5000
Suppose that the CURRENT_TIMESTAMP is 2000-01-06 11:14:41.748703. Find the number
of days, hours, minutes, seconds, and fractional seconds in the difference of the current
timestamp and the SHIP_TIMESTAMP in the PROJECT table:
SELECT projcode,
(CURRENT_TIMESTAMP - ship_timestamp) DAY(4) TO SECOND(6)
FROM samdbcat.persnl.project;
Project/Code
------------
--- 6 row(s) selected.
264
SQL Language Elements
START_DATE
2007-04-10
2007-06-10
2007-10-10
2007-08-21
2007-09-21
2007-09-28
(EXPR)
---------------------
1000
1355 02:58:57.087086
2000
1264 02:43:57.087086
2500
1111 02:13:57.087086
3000
1172 03:03:57.087086
4000
1172 00:58:57.087086
5000
1165 01:48:55.975986
SHIP_TIMESTAMP
2007-04-21:08:15:00.0000
2007-07-21:08:30:00.0000
2007-12-21:09:00:00.0000
2007-10-21:08:10:00.0000
2007-10-21:10:15:00.0000
2007-10-28:09:25:01.1111
EST_COMPLETE
15
30
60
60
30
30

Advertisement

Table of Contents
loading

Table of Contents