Link to home
Start Free TrialLog in
Avatar of jamesb_007
jamesb_007

asked on

create SQL Calendar

Hi

I need some help.

I am using SQL 2005, and I have a calendar created, attach is an example of how my calendar looks.

What I would like to go is create a script that would update the table BTItem that has a field name 'DATE'
which would have a numeric value e.g.  1 = Sunday,  2 = Monday....etc...so the script would add 1 to the date field.

But here is the catch, I only want the script to run on working days.
Weekends and holidays I DO NOT want it to update the table BTItem.

What is the SQL code for this ???

I am at a lost.
Time.xls
ASKER CERTIFIED SOLUTION
Avatar of adlink_la
adlink_la

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adlink_la
adlink_la

As for the holidays, you will need to add a column to your calendar table to put them in or create another table that you can join to, to get them.  A seperate table would probably be easier to manage.
Avatar of jamesb_007

ASKER

Thanks Bro !!!


I understand......working good so far.