I have made a function (returnMonth) for returning the month either as a full string or as a the month number from a date. The problem is that when I try to group according to this function I get the following error.
org.h2.jdbc.JdbcSQLException: Column DATE must be in the GROUP BY list; SQL statement: SELECT returnMonth(date, 'name') AS "month" , COUNT(*)AS "count", SUM (invoice.value) AS "sum", AVG(invoice.value) AS "average" FROM invoice WHERE invoice.farmerId=1 AND invoice.companyId LIKE '1' AND invoice.dbyear LIKE '%' GROUP BY returnMonth(date, 'name') ORDER BY returnMonth(date, 'no') [90016-117] Any suggestions? thank you in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
