In SQL Server 2005 I have a table with the following columns:
Table Reservations:
ID
arrival datetime
departure datetime
reservation_object (FK to objects table)
Now I need to generate a report that shows for a specified period the status of an object. This report will have to look like this:
6/1/09 6/2/09 6/3/09 6/4/09 ...
object 1 free free busy busy
object 2 busy free busy busy
...
What is the best way to get this information from SQL server? I'm going to use it in C#.Net.