‎04-03-2013 04:17 PM
Solved! Go to Solution.
‎04-03-2013 06:42 PM
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 1' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 2' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 3' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 4' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows')
‎04-04-2013 04:12 PM
‎04-03-2013 06:42 PM
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where (tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 1' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 2' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 3' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows') Or
(tblAssets.AssetID Not In (Select Top 1000000 tblServices.AssetID
From tblServices Inner Join tblServiceState On tblServiceState.StateID =
tblServices.StateID Inner Join tblServicesUni
On tblServicesUni.ServiceuniqueID = tblServices.ServiceuniqueID
Where tblServicesUni.Name = 'Service Name 4' And tblServiceState.State =
'running') And tsysAssetTypes.AssetTypename = 'windows')
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now