Feb 27, 2008 09:47 AM|dhimant|LINK
First problem is that +7 does not add 7 more days to the date. Anyone know a solution to this?
The solution to your first problem is to change your query as below:
SELECT [date], [time], [event] FROM [calender] WHERE [date] < getdate() + 7 GROUP BY [date] ORDER BY [date], [time], [event]
The getdate() function of SQL Server returns you the current date time value and + 7 would add 7 days to it.
Second problem is that I want the list to show the date only once, and each occurance of time and event grouped under the date. Like this:
For the second problem, you need to provide us with your table structure and sample data so that we can build the query for you.