How do I fix this query so that the results will be grouped by RoomID, and in order by ReserveRoomStart? Here, what I have, and I always have trouble with this kind of query.
Here's the query:
And, here's the error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'ReserveID' as part of an aggregate function.
SQL = "SELECT ReserveID, ReserveRoomStart, ReserveRoomEnd, PersonFirstName, RoomName, PersonLastName FROM ReserveTable, RoomTable, PersonTable WHERE ReserveRoomID = RoomID AND ReservePersonID = PersonID GROUP BY RoomName, ReserveRoomStart"
Calista :-X
Jedi Knight,
Champion of the Force
Here's the query:
Code:
SELECT ReserveID, ReserveRoomStart, ReserveRoomEnd, PersonFirstName, RoomName, PersonLastName
FROM ReserveTable, RoomTable, PersonTable
WHERE ReserveRoomID = RoomID AND
ReservePersonID = PersonID
<CFIF Form.Employee_ID IS NOT "Anyone">
AND PersonID = '#Form.Employee_ID#'
</CFIF>
GROUP BY RoomName,
ReserveRoomStart
And, here's the error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'ReserveID' as part of an aggregate function.
SQL = "SELECT ReserveID, ReserveRoomStart, ReserveRoomEnd, PersonFirstName, RoomName, PersonLastName FROM ReserveTable, RoomTable, PersonTable WHERE ReserveRoomID = RoomID AND ReservePersonID = PersonID GROUP BY RoomName, ReserveRoomStart"
Calista :-X
Jedi Knight,
Champion of the Force