Want to update database automatically
Dear Friends,
I have developed an application using C#.NET and ASP.NET.
Now I have a problem in my hand...
I am describing a scenario as my problem.
Lets think I have an field in my database(MS SQL Server) as joining date and also another field that contains service length( in no. of days).
I want to update this service length every day automatically.
How I can do that ?
Is it possible from application server without running the application ?
Have u any better suggestion in ur hand ? Pls Help me.
--Rajib
Dhaka, Bangladesh.
Re: Want to update database automatically
Isn't that redundant? You could simply calculate service length each time the value needs to be retrieved from the database, by adding the number of days since joining_date minus the number of weekends and holidays. You could create a UDF for this. IMEO, it's a waste to store this value in the database and have it updated every day.
If you DO need it updated every day due to the fact that you might be stuck with that structure now, then you should look into SQL Server Jobs.