A Problem with using MAX function, please help [message #215340] |
Sun, 21 January 2007 11:40 |
Kingdog
Messages: 5 Registered: December 2006
|
Junior Member |
|
|
I'm trying to write a query to find the longest duration of a booking. Whenever I run this query, the result is "no rows
selected" but I'm sure there is a longest duration of booking in the data. Can somebody give me some help?
This is my query:
SELECT Date, (EndTime-StartTime)
FROM booking
WHERE (EndTime-StartTime)=(SELECT MAX(EndTime-StartTime) FROM booking);
|
|
|
|