25 pts.
 Calculate time difference with Oracle 9i
1)i wanna calculate difference between current time and time which is stored in table. how will i calculate the difference between 2 time?? 2) after calculating this difference ,if this difference is greater than 3 hrs my system should genrate an email to technical head. how do i do this?shall i go for any trigger?if yes which trigger ? on which event??? or can i use timer in forms? i am using oracle 9i and forms 6i.pls guide me. i new in oracle. thnx in advance.

Software/Hardware used:
ASKED: May 18, 2009  11:50 AM
UPDATED: February 29, 2012  11:12 PM

Answer Wiki:
To calculate the difference you just need to perform a subtraction, for example: sysdate - some_date_column The result will be given in days, so you have to convert it as needed. To send the e-mail, you could use the UTL_SMTP database package, or write some forms code to use outlook to send it. <a href="http://www.dba-oracle.com/t_utl_smtp_utility.htm">Oracle utl_smtp utility to sending e-mail</a> <a href="http://www.lazydba.com/oracle/0__113257.html">Forms - Emailing via Outlook </a>
Last Wiki Answer Submitted:  February 29, 2012  11:12 pm  by  Sqlexpertz   15 pts.
All Answer Wiki Contributors:  Sqlexpertz   15 pts. , carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _