-
Incident report
-
Resolution: Fixed
-
Major
-
1.8.4
-
None
-
Oracle 10g2
ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00904: "CNT": invalid identifier[/var/www/zabbix/include/db.inc.php:444]
SQL error [ORA-00904: "CNT": invalid identifier] in [SELECT key_, count(*) as cnt FROM items WHERE (hostid IN (30103)) GROUP BY key_ HAVING cnt > 1]
ocifetchinto() [<a href='function.ocifetchinto'>function.ocifetchinto</a>]: ORA-24374: define not done before fetch or execute and fetch[/var/www/zabbix/include/db.inc.php:597]
ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00904: "CNT": invalid identifier[/var/www/zabbix/include/db.inc.php:444]
SQL error [ORA-00904: "CNT": invalid identifier] in [SELECT name, count(*) as cnt FROM applications WHERE (hostid IN (30103)) GROUP BY name HAVING cnt > 1]
ocifetchinto() [<a href='function.ocifetchinto'>function.ocifetchinto</a>]: ORA-24374: define not done before fetch or execute and fetch[/var/www/zabbix/include/db.inc.php:597]
Oracle not understand aliases in GROUP BY, ORDER BY, HAVING.
Need:
SELECT key_, count as cnt FROM items WHERE (hostid IN (30103)) GROUP BY key_ HAVING count
> 1;