David,

SysDate is a function and can be referenced in any SQL statement.  So you
could do the following if you want seconds between the two, or leave off
some or all of the trailing multiplicands to get fractional minutes, hours
or days.

Select ( SysDate - Next_Date ) * 24 * 60 * 60
>From   User_Refresh
;

You need to do a little reading in the Oracle SQL Reference under Datatypes
to find out details of the Date datatype and Date arithmetic.

Jack

--------------------------------
Jack C. Applewhite
Database Administrator/Developer
OCP Oracle8 DBA
iNetProfit, Inc.
Austin, Texas
www.iNetProfit.com
[EMAIL PROTECTED]
(512)327-9068


-----Original Message-----
David M
Sent: Monday, April 01, 2002 11:42 AM
To: Multiple recipients of list ORACLE-L


Jack,

How about substracting a system date with a database replication date to get
difference of time?  Can you please give me a specific command?


SQL> select to_char(sysdate, 'Dy Mon Dd HH24:MI:SS YYYY') from dual;

TO_CHAR(SYSDATE,'DYMONDD
------------------------
Mon Apr 01 11:08:00 2002    ==================> System Time.


SQL> select next_date from user_refresh;

NEXT_DATE
------------------------
Mon Apr 01 11:11:01 2002  ==============> Replication time.

Thanks,
David




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jack C. Applewhite
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to