→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎06-15-2017 01:34 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblSerialnumber.Product,
tsysIPLocations.IPLocation,
tblAssets.IPAddress,
tblAssetCustom.State,
tblADComputers.Lastchanged As AD_LastChanged
From tblAssets
Inner Join tblComputerSystemProduct On tblAssets.AssetID =
tblComputerSystemProduct.AssetID
Inner Join tblSerialnumber On tblAssets.AssetID = tblSerialnumber.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where tblSerialnumber.Product Like '%office%' And tblAssetCustom.State = 1 And
(Select Count(*) From tblSerialnumber As a
Where a.Product like '%office%') > 1
Order By tblAssets.AssetName
Solved! Go to Solution.
‎06-20-2017 10:11 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSerialnumber.Product,
tblSerialnumber.ProductKey
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblSerialnumber ON tblAssets.AssetID = tblSerialnumber.AssetID
AND tblSerialnumber.Product LIKE 'Microsoft Office%'
AND tblSerialnumber.Product NOT LIKE '%Visio%'
AND tblSerialnumber.Product NOT LIKE '%Project%'
WHERE
tblAssetCustom.State = 1
AND tblAssets.Assettype = -1
AND ( SELECT Count(*)
FROM tblSerialnumber
WHERE
tblSerialnumber.AssetID = tblAssets.AssetID
AND tblSerialnumber.Product LIKE 'Microsoft Office%'
AND tblSerialnumber.Product NOT LIKE '%Visio%'
AND tblSerialnumber.Product NOT LIKE '%Project%'
) > 1
‎06-21-2017 12:34 PM
‎06-20-2017 10:11 PM
SELECT Top 1000000
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblSerialnumber.Product,
tblSerialnumber.ProductKey
FROM
tblAssets
INNER JOIN tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tsysAssetTypes ON tsysAssetTypes.AssetType = tblAssets.Assettype
INNER JOIN tblSerialnumber ON tblAssets.AssetID = tblSerialnumber.AssetID
AND tblSerialnumber.Product LIKE 'Microsoft Office%'
AND tblSerialnumber.Product NOT LIKE '%Visio%'
AND tblSerialnumber.Product NOT LIKE '%Project%'
WHERE
tblAssetCustom.State = 1
AND tblAssets.Assettype = -1
AND ( SELECT Count(*)
FROM tblSerialnumber
WHERE
tblSerialnumber.AssetID = tblAssets.AssetID
AND tblSerialnumber.Product LIKE 'Microsoft Office%'
AND tblSerialnumber.Product NOT LIKE '%Visio%'
AND tblSerialnumber.Product NOT LIKE '%Project%'
) > 1
‎06-20-2017 03:12 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now