Subject Re: [firebird-support] Re: Trouble with BETWEEN operator
Author Anderson Farias
Hi Helen,

> HAVING is not valid except with respect to GROUP BY.

That really 'depends'

SELECT SOMEFIELD FROM SOME TABLE HAVING COUNT(*)=x;

will not work couse the engine spects a 'group by' clause.. BUT OTOH:

SELECT SOMECONSTANT FROM SOME TABLE HAVING COUNT(*)=x;

Does work couse is much like

SELECT COUNT(*), SOMECONSTANT
FROM SOME TABLE HAVING COUNT(*)=x;

So... no need for a group by.


Regards,
Anderson Farias