In Oracle it's DBMS_JOB.SUBMIT. I assume there will be only one job per day (I can imagine that you might want to have several jobs per day if you are dealing with a lot of fruit, which is likely). You set the date for the job to run as whatever 'mature date' is. As Jignesh Makwana suggested, the procedure executed by the job should scan the whole table in one go (cursor c_A is select Cust_id, Cust_name, Loan_Amt, Taken_Date, Mature_Date, Interest Status from A where Mature_Date <= sysdate and status = 'Open') open c_A for update, and for each record insert what you want into the other table AND update A where current of r_A, set Status = 'Closed'.
On Nov 14, 2:37 am, Michael Moore <michaeljmo...@gmail.com> wrote: > You could use a cron job which checks the dates, or use the dbms_scheduler > > http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_sche... > > On Sun, Nov 13, 2011 at 6:46 AM, Jignesh Makwana > <makwanajigne...@gmail.com>wrote: > > > > > > > > > > > Write a sub program and call it from the end of the day job so that you do > > this maturity check only once in a day. > > On Nov 13, 2011 1:53 PM, "SANDEEP REDDY" <tosandeepyan...@gmail.com> > > wrote: > > >> We Are Not Updating AnyThing Inbetween The Duration...But Should Fire > >> Automatically When Mature Date Reaches....Mind Blowingggg....No Idea's > > >> We Can Manually Update Even With Procedures .. But the interviewer > >> Question Is To fire Automatically WithOut User Interface... > > >> On Nov 12, 11:19 pm, Michael Moore <michaeljmo...@gmail.com> wrote: > >> > use an 'after update' trigger. > > >> > On Sat, Nov 12, 2011 at 5:40 AM, SANDEEP REDDY < > >> tosandeepyan...@gmail.com>wrote: > > >> > > Consider A Table With Columns > > >> > > Cust_id Cust_name Loan_Amt Taken_Date Mature_Date Interest Status > > >> > > 1 Apple 10000 15-02-2009 28-04-2011 8.5% Open > >> > > 2 Banana 25000 26-04-2010 17-09-2011 9% Open > > >> > > I Want The table to be updated implicitly when mature_date=sysdate > >> > > with following Output Inserted In Another Table.. > > >> > > Cust_Id Loan_Amt Interest Duration Total_amt > > >> > > 1 10000 8.5 180 (180/365)*1.85 <---For > >> > > Example > > >> > > And The Status Should Be Closed After Calculating.. > > >> > > This has To Be done Without Any User Interface... > > >> > > I Am Unable Solve This Query... Help Me > > >> > > Thanks In Advance > > >> > > -- > >> > > You received this message because you are subscribed to the Google > >> > > Groups "Oracle PL/SQL" group. > >> > > To post to this group, send email to Oracle-PLSQL@googlegroups.com > >> > > To unsubscribe from this group, send email to > >> > > oracle-plsql-unsubscr...@googlegroups.com > >> > > For more options, visit this group at > >> > >http://groups.google.com/group/Oracle-PLSQL?hl=en > > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Oracle PL/SQL" group. > >> To post to this group, send email to Oracle-PLSQL@googlegroups.com > >> To unsubscribe from this group, send email to > >> oracle-plsql-unsubscr...@googlegroups.com > >> For more options, visit this group at > >>http://groups.google.com/group/Oracle-PLSQL?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Oracle PL/SQL" group. > > To post to this group, send email to Oracle-PLSQL@googlegroups.com > > To unsubscribe from this group, send email to > > oracle-plsql-unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/Oracle-PLSQL?hl=en -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en