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 |
|
aiken
Aged Yak Warrior
525 Posts |
Posted - 2005-09-19 : 19:13:50
|
| I'm in need of a scheme to store recurring events. To start with, each event is essentially a weekly meeting ("every monday from 3:00pm to 4:00pm" or "every thursday from 1:00pm to 3:00pm"). However, I'd also like to be able to support arbitrary frequencies (monthly, etc).I set out to just do it, like everything else I do, and came up stumped. Do I store the first event and a length, and then a recurrance (in minutes)? If so, it seems like computing what event is going on "now" in six months gets complicated.Is there some kind of fundamental design pattern for doing this in SQL that I'm just clueless about?Thanks-b |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-09-19 : 22:33:00
|
| meeting name|meeting topic|meeting start time|meeting end time|frequency?? Just use one-time, daily, weekly, monthly as frequency values. You can then use the DATEADD function to figure actual event times.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|