‎03-04-2021 08:07 PM
Select Top 1000000 tblAssetCustom.Manufacturer,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tsysAssetTypes.AssetTypename Like '%Windows%' And tblAssetCustom.Model <>
'%Latitude%'
Group By tblAssetCustom.Manufacturer
Order By Total Desc
‎03-04-2021 09:11 PM
‎03-04-2021 09:18 PM
RC62N wrote:
If you want to use wildcards, you need to test for "like"-ness, not equality.
Change <> '%Latitude%' to NOT LIKE '%Latitude%' (i.e. the text string doesn't contain "Latitude").
Model = 'Latitude' (Model is "Latitude")
Model <> 'Latitude' (Model is not "Latitude")
Model LIKE 'Latitude%' (Model starts with "Latitude")
Model LIKE '%Latitude' (Model ends with "Latitude")
Model LIKE '%Latitude%' (Model contains "Latitude")
Model LIKE 'Lat%tude' (Model starts with "Lat" and ends with "tude")
Model NOT LIKE 'Latitude%' (Model doesn't start with "Latitude")
Model NOT LIKE '%Latitude' (Model doesn't end with "Latitude")
Model NOT LIKE '%Latitude%' (Model doesn't contain "Latitude")
Model NOT LIKE 'Lat%tude' (Model doesn't start with "Lat" and end with "tude")
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now