Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Monthly events calendar
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Monthly events calendar
Divers
Thread ID:
00779571
Message ID:
00779571
Vues:
47
Hi everybody,

Bellow is a problem, I found interesting, and would appreciate your input.
============
I have a table with events that has an Event Description, a start date and an end date and some other fields.
When i'm showing the current month's calendar, i want to display the summary of the events for each day, but without running a query for every day.
For exampe when i'm showing the 1st day of the month, i've got to summarize all the events (from the events table) that are active for the particular day.
------------------------------------
| 1  | 2  | 3  | 4  | 5  | 6  | 7  |
|(2) |(7) |    |    |(9) |    |    |
------------------------------------
| 8  | 9  | 10 | 11 | 12 | 13 | 14 |
|(2) |(7) |    |    |(9) |    |    |
------------------------------------
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
|    |    |    |(14)|(9) |(3) |    |
------------------------------------
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
|    |    |(11)|    |    |(12)|    |
------------------------------------
| 29 | 30 | 31 |    |    |    |    |
|    |(4) |    |    |    |    |    |
------------------------------------
Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform