Inserting records based on the day of the week

  • We are creating a schedule in SQL 2005. This schedule is constantly updated and is continuous. We need to add tasks to this schedule that could go either Monday/Wednesday/Friday or Tuesday/Thursday. Is there a way to insert the tasks based on the day of the week regardless of date?

  • select datename(dw,getdate()) will give you the day of the week, you can script you logic based on this.

    Prasad Bhogadi
    www.inforaise.com

  • Melissa Scheuer (4/23/2008)


    We are creating a schedule in SQL 2005. This schedule is constantly updated and is continuous. We need to add tasks to this schedule that could go either Monday/Wednesday/Friday or Tuesday/Thursday. Is there a way to insert the tasks based on the day of the week regardless of date?

    You can create sql server job. that should satisfy your requirement.


    Everything you can imagine is real.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply