Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Having clause - more unexpected pickiness
Having clause - more unexpected pickiness [message #387037] Wed, 08 April 2009 19:25 Go to next message
Josh Davis is currently offline Josh DavisFriend
Messages: 10
Registered: July 2009
Junior Member
If I try to run this query:

select city.stateId, count(city.cityId) from VCity city group by
city.stateId having count(city.cityId) >= :value_0

It fails with this error:

invalid HAVING expression [COUNT(city.cityId) >= value_0] for query with
grouping [GROUP BY city.stateId]. The HAVING clause must specify search
conditions over the grouping items or aggregate functions that apply to
grouping items

However, if I change it to this:

select city.stateId, count(city.cityId) from VCity city group by
city.stateId having count(city.stateId) >= :value_0

It works.

Is that expected behavior?
Re: Having clause - more unexpected pickiness [message #387067 is a reply to message #387037] Thu, 09 April 2009 13:30 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Sounds odd, please log the bug.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Re: Having clause - more unexpected pickiness [message #387079 is a reply to message #387067] Fri, 10 April 2009 13:02 Go to previous message
Josh Davis is currently offline Josh DavisFriend
Messages: 10
Registered: July 2009
Junior Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=271889
Previous Topic:Is JPA QL supposed to be this picky?
Next Topic:multiple xml-mappings from fragments?
Goto Forum:
  


Current Time: Thu Sep 19 19:23:12 GMT 2024

Powered by FUDForum. Page generated in 0.03593 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top