I'm using a search action to do a count on rows by group. I add the field I'm counting and then add the fields I want to group by.

On every new field I drag in, a distinct clause is prepended to the SQL statement.

The query ends up being something like

SELECT s1.state,s1.city,COUNT(DISTINCT .DISTINCT .DISTINCT .DISTINCT .DISTINCT s1._rowid) AS COUNT__rowid FROM student_roster s1 GROUP BY s1.state,s1.city ORDER BY 1 ASC,2 ASC

And on execution returns...

Error
An error occurred while processing your request:

File: index.taf
Position: Search_report
Class: DBMS
Main Error Number: 1064

[MySQL][ODBC 3.51 Driver][mysqld-4.0.12-nt]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 'DISTINCT .DISTINCT .DISTINCT s1._rowid) FROM student_roster s1
37000



This happens in summary of groups and summary of all rows.

Is this normal behavior or should this be submitted as a bug?

Witango 5.0.9

Reply via email to