Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mona
Starting Member
5 Posts |
Posted - 2004-06-04 : 04:58:00
|
| Hi, i have an employee table with from-date, to-date range. i want to have for each employee all starting weeks that fall between from-date and to-date. And i don't have a calendar.thank you for any help. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2004-06-04 : 05:06:35
|
| Datediff() will help you... |
 |
|
|
mona
Starting Member
5 Posts |
Posted - 2004-06-04 : 05:17:03
|
| it is more like this: employee X, date-from:1-june-2004, date-to:31-july-2004. i want to be able to have:employee X 7-june-2004employee X 14-june-2004employee X 21-june-2004and so on till26-july-2004 |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2004-06-04 : 05:21:13
|
| You could produce a table of start weeks and then cross? join it to the employees where the start weeks fall between from and to dates. I think.-------Moo. :) |
 |
|
|
mona
Starting Member
5 Posts |
Posted - 2004-06-04 : 05:26:39
|
| well, if i don't have another choice. i was trying to get away with managing a calendar table, just for that purpose. |
 |
|
|
|
|
|