Query with HAVING
Posted: Mon Oct 15, 2001 10:31 am
Hi all,
Im using InfmxCli and i cant execute a query like that:
SELECT a, MAX(b) FROM tabA
GROUP BY a
HAVING MAX(b) = SELECT c FROM tabC
It gives the follow message:
[Informix] [Odbc Informix Driver] General error. Syntax error,
SQLExecute: Failed to execute statement.
If i use:
SELECT a, MAX(b) FROM tabA
GROUP BY a
HAVING MAX(b) = 1
it works, but when i put a select instruction it gives an error.
Anyone can help me?
Thanks in advance, Nuno Pimenta
Im using InfmxCli and i cant execute a query like that:
SELECT a, MAX(b) FROM tabA
GROUP BY a
HAVING MAX(b) = SELECT c FROM tabC
It gives the follow message:
[Informix] [Odbc Informix Driver] General error. Syntax error,
SQLExecute: Failed to execute statement.
If i use:
SELECT a, MAX(b) FROM tabA
GROUP BY a
HAVING MAX(b) = 1
it works, but when i put a select instruction it gives an error.
Anyone can help me?
Thanks in advance, Nuno Pimenta