Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,068 of 2,288    |
|    Jim Kennedy to Jagdip Singh Ajimal    |
|    Re: PL/SQL trigger fires once a day    |
|    08 Feb 04 17:36:28    |
   
   From: kennedy-downwithspammersfamily@attbi.net   
      
   "Jagdip Singh Ajimal" wrote in message   
   news:c84eb1b0.0402080348.403d0328@posting.google.com...   
   > 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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca