Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 trigger which gets fired daily

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-10 : 06:48:27
mehal writes "Hi,

I have am emp table which has a date of joining field, casual leave and provilaged leave. My requirement is that for the first 6 months a emp does not have any leave. Next six months he has a cl of 20 days and after 1 year he has a pl of 20 more days.

I want this task to be automated in some way ( a trigger) which checks the emps doj with the server date and update the leave data. Can this be automated.

Is whats the process.."

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-06-10 : 07:53:44
Look up jobs and scheduling jobs in BOL

Dont think it would be a good idea of using a trigger as this would rely on a "transaction" occuring on the table to fire the trigger.
What if nothing happened on the table for days/weeks/months your data wouldnt be accurate

You could also acheive this by normalising the table by creating a leave table and query against that, but not knowing your requirements/structure/business logic then i cant really say that this is the way to go

Andy

Beauty is in the eyes of the beerholder
Go to Top of Page
   

- Advertisement -