@MakeBug, thank you, this is a good way. However, we recommend using the system table tsysIPlocations for this purpose, as outlined
here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
tsysOS.Image As icon
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tsysIPlocations On tblAssets.IPNumeric Between
tsysIPlocations.StartIP and tsysIPlocations.EndIP
Where tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where
tblSoftwareUni.softwareName Like 'WatchGuard Authentication Client 11.9.4')
And tblAssetCustom.State = 1 And tsysIPlocations.IPLocation like
'%[IP Location Name]%'
Order By tblAssets.AssetName
In case it is not possible to create a separate IP location for these servers (i.e. because they are already in another IP location with a larger range), you are able to filter directly on tblAssets.IPNumeric:
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tsysOS.OSname,
tblAssets.Description,
tsysOS.Image As icon
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssets.AssetID Not In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID =
tblSoftware.softID
Where
tblSoftwareUni.softwareName Like 'WatchGuard Authentication Client 11.9.4')
And tblAssetCustom.State = 1 And tblAssets.IPNumeric Between 192168090001 And
192168092254
Order By tblAssets.AssetName