select Distinct
CS.Name0,
SER.Displayname0,
SER.Started0,
SER.StartMode0,
SER.State0
from
dbo.v_GS_COMPUTER_SYSTEM CS,
dbo.v_GS_SERVICE SER,
dbo.v_FullCollectionMembership FCM
where
CS.ResourceId = SER.ResourceID
and CS.ResourceId = FCM.ResourceID
and SER.displayname0 like ‘%firewall%’
and (SER.State0 != ‘Running’ or Isnull(SER.State0,”)=”)
and FCM.CollectionID = ‘SMS00001′
9 Comments
SELECT DISTINCT
CS.Name0,
SER.Displayname0,
SER.Started0,
SER.StartMode0,
SER.State0
FROM
dbo.v_GS_COMPUTER_SYSTEM CS,
dbo.v_GS_SERVICE SER,
dbo.v_FullCollectionMembership FCM
WHERE
CS.ResourceId = SER.ResourceID
AND CS.ResourceId = FCM.ResourceID
AND SER.displayname0 LIKE '%Service%'
AND (SER.State0 != 'Running' OR ISNULL(SER.State0,'')='')
AND FCM.CollectionID = 'SMS00001';
Hello,
I have an issue with the syntax in
Isnull(SER.State0,”)=”) or Isnull(SER.State0,’)=’)
the double quotes or single quotes did not work…
What could be the correct syntax?
Thanks,
Dom
the error is:
“An expression of non-boolean type specified in a context where a condition is expected “
Hi,
Try wirh quotes ' where required. It looks like the blog convert the quotes to fancy quotes which is causing the issue.
hii. i also face same problem. can u help me ?
Hi,
what is the issue you are having?
Thanks,
Eswar
Hi,
You need to replace the quotes with ''
Thanks
Eswar
SELECT DISTINCT
CS.Name0,
SER.Displayname0,
SER.Started0,
SER.StartMode0,
SER.State0
FROM
dbo.v_GS_COMPUTER_SYSTEM CS,
dbo.v_GS_SERVICE SER,
dbo.v_FullCollectionMembership FCM
WHERE
CS.ResourceId = SER.ResourceID
AND CS.ResourceId = FCM.ResourceID
AND SER.displayname0 LIKE '%Service%'
AND (SER.State0 != 'Running' OR ISNULL(SER.State0,'')='')
AND FCM.CollectionID = 'SMS00001';
Cool Information... Thanks!