Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Yearly Automatic Table Insertion
On 19 Mar 2004 09:51:50 -0800, mwagner_at_mail.dot.state.de.us (mw)
wrote:
>I have a table called years in my database that is used for populating
>a year dropdown list on various end user web forms. I'm looking for a
>solution for automatically adding the next year to this table at a
>specified date, once a year, on a recurring yearly basis (i.e. every
>December 1st, the next year is automatically added to the years
>table). The application is a java web application, using
>CallableStatements to execute plsql packages, functions, etc on the
>database side. It may be distributed to many clients. I thought of
>creating stored procedure, then scheduling it thru dbms_job to run
>once a year. Is there a better solution? What would be the most
>efficient way to do this?
There might be, but then it is not quite clear why you need a drop
down list of years, provided there are no 'gaps' in the range of
years.
If you really need the dropdown, dbms_job is the way to go.
-- Sybrand Bakker, Senior Oracle DBAReceived on Fri Mar 19 2004 - 16:49:02 CST