[jboss-user] [EJB 3.0] - Group By Error

jgilbert do-not-reply at jboss.com
Tue Sep 19 17:03:17 EDT 2006

I get the following execption:

	java.sql.SQLException: Not in aggregate function or group by clause: 

when I try to run this EQL statement:

	select p.agency.name, p.customer.name, sum(p.amount) 
  | 	from Payment p 
  | 	group by p.agency.name, p.customer.name 
  | 	having p.date between :startDate and :endDate
If I change the group by statement to this:	

	group by p.agency.name, p.customer.name, p.date
Then the error goes away, but obviously I don't get the result I wanted.	

Any thoughts? Am I doing something wrong? Or is this a bug?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972738#3972738

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972738

More information about the jboss-user mailing list