Having clause - more unexpected pickiness [message #387037] |
Wed, 08 April 2009 15:25  |
Eclipse User |
|
|
|
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?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25617 seconds