I'm trying to create a report that just shows Total numbers for all our Desktops for a specific Manufacturer or Model. If I can figure one out the other should be a piece of cake.
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
I have this but it is not filtering out the Latitude laptops. They will still show in our Total count. This also happens with the Lenovos as well if I try to wildcard with %ThinkPad%. I'm sure it's just a simple order of operations or value. SQL is not my forte and I'm trying to learn on the fly.
Any suggestions / help is appreciated.