‎11-20-2014 01:08 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename As AssetType,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.Lastseen,
tblAssets.Lasttried,
Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) As [Remaining %],
tblCustDevPrinter.Tonername,
tblCustDevPrinter.Lastchanged
From tblCustDevPrinter
Inner Join tblAssets On tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Where Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum *
100) >= 0 And tblCustDevPrinter.TonerMaximum > 0 And tblAssetCustom.State = 1
Order By [Remaining %],
tblAssets.IPNumeric,
tblAssets.Assetname
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now