By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,197 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,197 IT Pros & Developers. It's quick & easy.

PL/SQL trigger fires once a day

P: n/a
I am creating a table of appointments. As this table is going to get
very large very quickly, I want to move the old appointments into a
backup table, backupAppointments. How do I do this using a trigger? I
have got this so far:

create or replace trigger cleanAppointments
after insert on appointments
when apoointments.date < SYSDATE
Begin
-- move the records
End;

Any help would be greatly appriciated.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Jagdip Singh Ajimal" <js*****@hotmail.com> wrote in message
news:c8**************************@posting.google.c om...
I am creating a table of appointments. As this table is going to get
very large very quickly, I want to move the old appointments into a
backup table, backupAppointments. How do I do this using a trigger? I
have got this so far:

create or replace trigger cleanAppointments
after insert on appointments
when apoointments.date < SYSDATE
Begin
-- move the records
End;

Any help would be greatly appriciated.


It wouldn't be a trigger. It would be a job. Use the dbms_job package to
schedule this as a repeating stored procedure to run as often as you would
like. (eg 1/day) See the documentation on supplied pl/sql packages.(this
has been in Oracle since version 7)
Jim
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.