[fpc-pascal] sqldb query error on group by with where clause
Michael Van Canneyt
michael at freepascal.org
Fri Sep 14 20:36:43 CEST 2007
On Sat, 15 Sep 2007, Bee wrote:
> This query...
> select k_province, k_city, k_school, count(file_id), sum(amt_student) from
> upload_log where (date(upload_time)='2007-09-14') group by k_province, k_city
> having k_province='205' and k_city='205031';
> raises exception...
> An unhandled exception occurred at $0808E144 :
> EDatabaseError : Error executing query: You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the right
> syntax to use near 'group by k_province, k_city having k_province='205' and
> k_city='205031';)' at line 1
Nevertheless, it's MySQL that reports the error.
Please set 'ParseSQL' to false and see if that helps ?
More information about the fpc-pascal