Home » SQL & PL/SQL » SQL & PL/SQL » How to Write a Timer Trigger (merged)
How to Write a Timer Trigger (merged) [message #385804] Wed, 11 February 2009 02:20 Go to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Dear All,
I have got the following Table like:
SQL> desc c_move;
 Name                            Null?    Type
 ------------------------------- -------- ----
 EMPNO                                    VARCHAR2(8)
 CDATE                                    DATE
 TIMEIN                                   VARCHAR2(8)
 TIMEOUT                                  VARCHAR2(8)
 PURPOSE                                  VARCHAR2(255)
 STATUS                                   VARCHAR2(1)
 APPTIME                                  VARCHAR2(10)

SQL> 


Now I would like to write a trigger on C_MOVE, such that Everyday it will fire the trigger when the system time is 11.00am. So that The EMPNO who's are missing/Absent will be taken to a another Table(Absent Table) and showing them as a absent along with their empno and cdate. I just want to have a hint to work with.
Re: How to Write a Timer Trigger [message #385808 is a reply to message #385804] Wed, 11 February 2009 02:38 Go to previous messageGo to next message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
@mahatab,

I don't see the relationship between trigger and your requirement. The database triggers are fired (executed) or called implicitly whenever the table associated with it is affected by any of the Database Manipulation (INSERT, UPDATE, DELETE).

Why don't you create a simple procedure with your requirements and schedule it using DBMS_JOB Package?

Regards,
Jo
Re: How to Write a Timer Trigger (merged) [message #385809 is a reply to message #385804] Wed, 11 February 2009 02:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64135
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Create a job.

Regards
Michel
Re: How to Write a Timer Trigger (merged) [message #385815 is a reply to message #385804] Wed, 11 February 2009 03:31 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Thanks everybody. Lets see what i come up with using your valuable hints.

Thanks once again
Mahatab
Re: How to Write a Timer Trigger (merged) [message #385818 is a reply to message #385804] Wed, 11 February 2009 03:39 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Oh, One more thing, can you please tell me after writing the procedure, how can i will be able to schedule it using DBMS_JOB Package? A Sample piece of code is expected, If possible.


Reagrads,
Mahatab
Re: How to Write a Timer Trigger (merged) [message #385819 is a reply to message #385818] Wed, 11 February 2009 03:49 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Search for dbms_job in this forum.OR you will find one artical here.
http://www.orafaq.com/node/871
Re: How to Write a Timer Trigger (merged) [message #385821 is a reply to message #385818] Wed, 11 February 2009 03:51 Go to previous message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
@mahatab,

Go through the following links:
DBMS_JOB
Oracle dbms_job example

Hope these helps,

Regards,
Jo
Previous Topic: "wrap utility" & "function" topics merged
Next Topic: Wrap Tool - Subquery Issue
Goto Forum:
  


Current Time: Thu Dec 08 05:52:46 CST 2016

Total time taken to generate the page: 0.12664 seconds