What should i research in order to accomplish this task?
I am using MS-SQL & VB.Net
I have a SQL table that stores startdate and enddate. I want to run a query on that table every 10 minutes in order to check if the enddate is greater than today and if it is I would like to add a 1 to another column if it is not I would like to add a 0.
How can I achieve this?
Your question seems like you’re asking for the wrong thing.
It sounds like you are looking for a trigger to fire off and update a calculated field. So it sounds like you want to setup a database trigger on the table and have that trigger fire on insert or update
Or something very similar to this anyway
You then put a scheduled job that will run at 0001 hour and update all the records which had endDate = yesterday’s date
edit: or is endDate actually time specific as well?
Perhaps in this case you should be using a view to select your data instead with a view definition of:
Edit2: fixed issue with the scheduled job which was not correct for endDate values that include a time value