#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    63
    Rep Power
    11

    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. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    You can write a stored procedure that updates the dates. Then set up a job to run the stored procedure every day. To determine how to set up a job, search your Books Online for "jobs, scheduling"
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo