|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
automated procedure in sql server
i'm trying to set up a table in sql server that will automatically update based on the date. basically, i want to display a list of dates for a year, given a set interval. when one date passes, i want its status set to inactive, and a new date added with a status of active. i would like this to run every day and check for new dates.
do i need to set up a trigger? a stored procedure? can someone point me in the right direction, and maybe give me some information to check out? thanks. |
|
#2
|
||||
|
||||
|
You could create a "job" that is scheduled to run on a daily basis, say at midnight. The job could contain a step that runs a stored procedure or a step that includes your actual SQL query to change the values in the table.
To create a job, open up SQL Server and go to Management->SQL Server Agent->Jobs. Right-click on the right-hand pane and select New Job. Hope this helps. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > automated procedure in sql server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|