Hello
Using SQL 2000
If I have a table called tblValidWorkingDays which comprises of a single field called workingDay (sample as shown)
How do I turn this into table tblWorkingDays such that there are 2 fields workingDay and dayNumber
Where dayNumber is the working day for that date as shown
Thanks
Damian.
Using SQL 2000
If I have a table called tblValidWorkingDays which comprises of a single field called workingDay (sample as shown)
Code:
workingDay
2006-11-01 00:00:00
2006-11-02 00:00:00
2006-11-03 00:00:00
2006-11-06 00:00:00
2006-11-07 00:00:00
2006-11-08 00:00:00
2006-11-09 00:00:00
2006-11-10 00:00:00
2006-11-13 00:00:00
2006-11-14 00:00:00
2006-11-15 00:00:00
2006-11-16 00:00:00
2006-11-17 00:00:00
2006-11-20 00:00:00
2006-11-21 00:00:00
2006-11-22 00:00:00
2006-11-23 00:00:00
2006-11-24 00:00:00
2006-11-27 00:00:00
2006-11-28 00:00:00
2006-11-29 00:00:00
2006-11-30 00:00:00
2006-12-01 00:00:00
2006-12-04 00:00:00
2006-12-05 00:00:00
2006-12-06 00:00:00
2006-12-07 00:00:00
2006-12-08 00:00:00
2006-12-11 00:00:00
2006-12-12 00:00:00
2006-12-13 00:00:00
2006-12-14 00:00:00
2006-12-15 00:00:00
2006-12-18 00:00:00
2006-12-19 00:00:00
2006-12-20 00:00:00
2006-12-21 00:00:00
2006-12-22 00:00:00
How do I turn this into table tblWorkingDays such that there are 2 fields workingDay and dayNumber
Where dayNumber is the working day for that date as shown
Code:
workingDay dayNumber
2006-11-01 00:00:00 1
2006-11-02 00:00:00 2
2006-11-03 00:00:00 3
2006-11-06 00:00:00 4
2006-11-07 00:00:00 5
2006-11-08 00:00:00 6
2006-11-09 00:00:00 7
2006-11-10 00:00:00 8
2006-11-13 00:00:00 9
2006-11-14 00:00:00 etc..
2006-11-15 00:00:00
2006-11-16 00:00:00
2006-11-17 00:00:00
2006-11-20 00:00:00
2006-11-21 00:00:00
2006-11-22 00:00:00
2006-11-23 00:00:00
2006-11-24 00:00:00
2006-11-27 00:00:00
2006-11-28 00:00:00
2006-11-29 00:00:00
2006-11-30 00:00:00
2006-12-01 00:00:00
2006-12-04 00:00:00
2006-12-05 00:00:00
2006-12-06 00:00:00
2006-12-07 00:00:00
2006-12-08 00:00:00
2006-12-11 00:00:00
2006-12-12 00:00:00
2006-12-13 00:00:00
2006-12-14 00:00:00
2006-12-15 00:00:00
2006-12-18 00:00:00
2006-12-19 00:00:00
2006-12-20 00:00:00
2006-12-21 00:00:00
2006-12-22 00:00:00
Thanks
Damian.