Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.AssetID,
Case
When tblCustDevPrinter.TonerMaximum = 0 Or
tblCustDevPrinter.TonerRemaining = 0 Then 0
Else Floor(tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum
* 100)
End As [Remaining %],
tblCustDevPrinter.TonerMaximum,
tblCustDevPrinter.Tonername,
tblCustDevPrinter.Lastchanged,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblCustDevPrinter
Inner Join tblAssets On tblCustDevPrinter.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Left Outer Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Where tblCustDevPrinter.TonerMaximum <> 0 And tblCustDevPrinter.TonerMaximum > 0
And tblCustDevPrinter.TonerRemaining <> 0 And
Floor(tblCustDevPrinter.TonerRemaining / (Case
When tblCustDevPrinter.TonerMaximum = 0 Then 1
Else tblCustDevPrinter.TonerMaximum
End) * 100) <= 10 And Floor(tblCustDevPrinter.TonerRemaining / (Case When tblCustDevPrinter.TonerMaximum = 0 Then 1 Else tblCustDevPrinter.TonerMaximum End) * 100) >= 0 And tblAssetCustom.State = 1
Order By [Remaining %]
Explore the full platform, free for 14 days.
No credit card required.