Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: (month is february and year is leap) job scheduling DBMS_JOB with oracle 9I
> I am developing an application in which i need to transfer data from
> one table to another table within same schema in ORACLE 9i.
>
> transfer period = month end (12:00 am)
> i.e. data will be transfer on last date of every month at 12:00 mid
> night
> e.g.
> IF month is janaury then transfer at 31-01-06 (12:00 am)
> month is february then transfer at 28-02-06/29-02-06 (12:00
> am)
> month is march then transfer at 30-01-06 (12:00 am)
> --
> ----
> ----
> and so on.............
> for above problem i am using DBMS_JOB for scheduling.
> but what is the logic IF month is february and year is leap.
>
> could anyone suggest..........
You could do:
(month is feb and day = 28 and not isleapyear(year))
or
(month is feb and day = 29 and isleapyear(year))
Write the "IsLeapYear" function if it doesn't exists.
-- Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.comReceived on Fri May 05 2006 - 07:22:30 CDT