In my database there is a table having two filelds first is Name and another is Levae_Available. Now what my requirement is that on Dec, 31 at 12:00AM if there are leaves available more than 10 then this table shluld be update on the same time.
So what should I need to use here webservices or sql jobs. Which is standard way to do that altough I am very new to both.
So could you please suggest and give some examples.
Thanks
It is our choices that show what we truly are, far more than our abilities...
you just need to create a sql batch or stored procedure that will contain the update statement of your requirement, now you should create a SQL job, paste your query/stored procedure there in sql job steps. At the end you should schedule your sql job to
your required time which is 31st of Dec 31 at 12.00 AM. your query will only run on that time and will do the required things, if you want you can change the time schedule to run on some interval.
you should not choose web service, because you need to create again a UI or windows service or some scheduled task to call the web service.
Ashutosh Pathak
Blog: http://catchcode.blogspot.com Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS
demoninside9
Participant
1182 Points
1697 Posts
Web Services Or Sql jobs
Apr 24, 2012 06:14 AM|LINK
Hi All,
In my database there is a table having two filelds first is Name and another is Levae_Available. Now what my requirement is that on Dec, 31 at 12:00AM if there are leaves available more than 10 then this table shluld be update on the same time.
So what should I need to use here webservices or sql jobs. Which is standard way to do that altough I am very new to both.
So could you please suggest and give some examples.
Thanks
Ashutosh Pat...
Contributor
5737 Points
1105 Posts
Re: Web Services Or Sql jobs
Apr 24, 2012 07:07 AM|LINK
you just need to create a sql batch or stored procedure that will contain the update statement of your requirement, now you should create a SQL job, paste your query/stored procedure there in sql job steps. At the end you should schedule your sql job to your required time which is 31st of Dec 31 at 12.00 AM. your query will only run on that time and will do the required things, if you want you can change the time schedule to run on some interval.
you should not choose web service, because you need to create again a UI or windows service or some scheduled task to call the web service.
Blog: http://catchcode.blogspot.com
Please mark it as answer if it helps, as clicking on the button can save time of others :)
MCP,MCAD,MCSD,MCTS