Definitely show us your code.
From what you've presented thus far, I can offer a few pointers and make some suggestions.
First off, the custom fields are all, by default, text values. As it is, using your example, you've assigned the text string "Black: 2" to CustomField1. That means that when, again, from your example, you do a comparison CustomField1 < 'Black: 1', it's going to compare the full text, not just the number as you appear to intend.
Suggestion: Go into Configure > Asset Pages, scroll down to "Asset Custom fields" and define the display name and data type, e.g. Custom01 -> Display name "Black" -> Info Type Numeric. Repeat for the other toner colours.
If you leave the data type as text, you run into the mess of string comparisons when you want to do numeric, so, for example, "10" < "2" because text comparisons work left-to-right, so it starts by comparing "1" to "2". You can get around it by converting the text to numeric in the query, before doing the comparison, but that's inefficient.
Having said all that, depending on exactly what you're doing this for, the information may already be present in the database. If you're doing this to monitor toner levels of network-connected printers, you could check whether LANSweeper is already reading that information from your printers.
Select Top 1000000
tblState.Statename,
tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
'http://' + tblAssets.IPAddress As [hyperlink_IP Address],
tblAssets.IPNumeric As [IP (sortable)],
tblAssets.IPAddress As [hyperlink_name_IP Address],
tblAssets.Mac As [MAC Address],
tblAssets.Lastseen,
tblAssetCustom.Location,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblAssetCustom.Printedpages,
tblAssetCustom.PrintedColorPages,
tblAssetCustom.PrintedMonoPages,
tblAssetCustom.Printerstatus,
tblCustDevPrinter.TonerNr,
tblCustDevPrinter.TonerName,
tblCustDevPrinter.TonerColorName,
tblCustDevPrinter.TonerColorNr,
tblCustDevPrinter.TonerMaximum,
tblCustDevPrinter.TonerRemaining,
Convert(VarChar(10), Cast( CASE
WHEN tblCustDevPrinter.TonerMaximum > 0 AND tblCustDevPrinter.TonerRemaining >= 0
THEN tblCustDevPrinter.TonerRemaining / tblCustDevPrinter.TonerMaximum * 100
END AS Decimal(6,2)) ) + '%' AS [Toner %],
tblCustDevPrinter.LastChanged
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblState On tblState.State = tblAssetCustom.State
LEFT JOIN tblCustDevPrinter ON tblCustDevPrinter.AssetID = tblAssets.AssetID
Where
tsysAssetTypes.AssetTypename = 'Printer'
AND tblCustDevPrinter.TonerName NOT LIKE '%Maintenance%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Drum%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Fuser%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Transfer%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Waste%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Collection%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Clean%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Roller%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Fan Filter%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Kit%'
AND tblCustDevPrinter.TonerName NOT LIKE '%Belt%'
Order By
tblAssetCustom.Manufacturer,
tblAssets.AssetName,
tblCustDevPrinter.TonerNr
You may need to expand the filter list if your inventory has more than just toner in the output.