What is the a problem with this query?
Executing this in an ASP script using ADODB with an unknown version of MySQL. Other queries work, including GROUP BY queries; but none of the date functions, DAYOFYEAR, MONTH, etc can be used with GROUP BY. These functions work in simple SELECT queries.
The error message is
You have an error in your SQL syntax near '(AcctStartTime) ' at line 1.
Could this be a limitation of an old version of MySQL?
Code:
SELECT
HOUR(AcctStartTime),
COUNT(*)
FROM radacct
WHERE
AcctStartTime BETWEEN '2003-11-03 00:00:00' AND '2003-11-03 23:59:59'
GROUP BY HOUR(AcctStartTime)
Executing this in an ASP script using ADODB with an unknown version of MySQL. Other queries work, including GROUP BY queries; but none of the date functions, DAYOFYEAR, MONTH, etc can be used with GROUP BY. These functions work in simple SELECT queries.
The error message is
You have an error in your SQL syntax near '(AcctStartTime) ' at line 1.
Could this be a limitation of an old version of MySQL?