How to know that ODBC query with "having" returned

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
alexoxol
Posts: 6
Joined: Fri Sep 30, 2005 2:00 am

How to know that ODBC query with "having" returned

Post by alexoxol »

Hello. MS SQL Server.
I want to check one table by SQL:

Code: Select all

select count(*) from Docs where type_id<>8 group by doc_date having count(*) > 1
and alert if there are more than 0 rows in resultset.
But HostMonitor returns "Inaccessible value".. Why?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

As usually 1st question is what version of HostMonitor do you use?
Old versions did not work with some data types...

Regards
Alex
alexoxol
Posts: 6
Joined: Fri Sep 30, 2005 2:00 am

Post by alexoxol »

HM 5.38
So, the query doesn't work only with "having" statement, but without it works fine. So strange..
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Oh, I missed HAVING statement. If you use HAVING, result set can be empty. Probably that's why HostMonitor shows error, it cannot check specified field in result set.

Regards
Alex
alexoxol
Posts: 6
Joined: Fri Sep 30, 2005 2:00 am

Post by alexoxol »

Thank you :)
Post Reply