[ http://issues.apache.org/jira/browse/DERBY-883?page=comments#action_12374884 ]
Matthias Ohlemeyer commented on DERBY-883: ------------------------------------------ If I read the documentation correctly (Reference Manual) then your SQL statement is simply not allowed in Derby; it says GROUP BY column-Name [ , column-Name ] * where column-Name is a simple column name or a correlation; in my experiences correlations only work when they refer to a simple column. But IMO you are still right: Derby is missing an essential feature here; instead of the above something like GROUP BY SelectItem [ , SelectItem ] * would be more in line with what other DBs have to offer; it should be possible to use arbitrary select items from the SELECT clause in the GROUP BY clause. This "shortcoming" has made it close to impossible to port a complex Oracle based application to Derby. But since the documentation seems to be clear, I think this "bug" should be reclassified as a "New Feature" or "Improvement"; for me the priority cannot be high enough, it is "Major" at least and of course "Critical" for my application, but I'm not sure this can be generalized. > Date functions are 'syntax error' in group by clause > ---------------------------------------------------- > > Key: DERBY-883 > URL: http://issues.apache.org/jira/browse/DERBY-883 > Project: Derby > Type: Bug > Components: SQL > Versions: 10.1.2.1 > Environment: JDK 1.5.0_05 > Reporter: Lluis Turro > > This select would return an error syntax on finding "(" after month if group > by clause: > select idissue, month(creation), year(creation), count(distinct idissue) > where > .... > group by idissue, month(creation), year(creation) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
