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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-13 : 01:47:39
|
| Steve writes "I have a table containing events with the following columns:PKId INT,Title varchar(50),StartDate datetime,EndDate datetimeThe start and end dates can be on different days. I want a query that will return one row for each day a particular event will occur. For example, the table contains the following 2 rows:PKID Title StartDate EndDate---- ---------------- ------------------ -----------------1 Single Day Event 5/7/2002 10:00 AM 5/7/2002 11:00 AM 2 Multi-Day Event 5/7/2002 8:00 AM 5/9/2002 5:00 PMI want a query that will return the following results:PKID Title StartDate---- --------------- ------------------1 Single Day Event 5/7/2002 10:00 AM2 Multi-Day Event 5/7/2002 8:00 AM2 Multi-Day Event 5/8/2002 8:00 AM2 Multi-Day Event 5/9/2002 8:00 AM" |
|
|
YellowBug
Aged Yak Warrior
616 Posts |
|
|
|
|
|