‎08-02-2019 05:26 PM
‎08-02-2019 10:33 PM
‎08-02-2019 08:37 PM
Select Top 1000000
...
tblAssetGroups.AssetGroup,
...
From
...
Inner Join tblAssetGroupLink On tblAssetGroupLink.AssetID = tblAssets.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID = tblAssetGroupLink.AssetGroupID
Where
tblAssetGroups.Dynamic = 1
AND tblAssetGroups.AssetGroup IN ('Desktop', 'Laptop')
Order By
tblAssetGroups.AssetGroup,
TsysChassisTypes.ChassisName Desc
‎08-02-2019 08:18 PM
CASEand add the new field to your ORDERing.
WHEN TsysChassisTypes.ChassisName IN ('Desktop',
'Low Profile',
'Mini Tower',
'Tower',
'Space-Saving',
'All in One',
'Mini PC',
'Pizza Box',
'Sealed-Case') THEN 'Desktop'
WHEN TsysChassisTypes.ChassisName IN ('Portable',
'Laptop',
'Notebook',
'Convertible',
'Sub Notebook',
'Hand Held',
'Lunch Box') THEN 'Laptop'
ELSE 'Other'
END AS ChassisGroup,
Where
TsysChassisTypes.ChassisName IN ('Laptop', 'Notebook', 'Portable', 'Desktop')
Select Top 1000000should do the trick.
COUNT(*) AS [Count],
CASE
WHEN TsysChassisTypes.ChassisName IN ('Desktop',
'Low Profile',
'Mini Tower',
'Tower',
'Space-Saving',
'All in One',
'Mini PC',
'Pizza Box',
'Sealed-Case') THEN 'Desktop'
WHEN TsysChassisTypes.ChassisName IN ('Portable',
'Laptop',
'Notebook',
'Convertible',
'Sub Notebook',
'Hand Held',
'Lunch Box') THEN 'Laptop'
ELSE 'Other'
END AS [ChassisGroup]
From
tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
Where
TsysChassisTypes.ChassisName IN ('Laptop', 'Notebook', 'Portable', 'Desktop')
Group By
CASE
WHEN TsysChassisTypes.ChassisName IN ('Desktop',
'Low Profile',
'Mini Tower',
'Tower',
'Space-Saving',
'All in One',
'Mini PC',
'Pizza Box',
'Sealed-Case') THEN 'Desktop'
WHEN TsysChassisTypes.ChassisName IN ('Portable',
'Laptop',
'Notebook',
'Convertible',
'Sub Notebook',
'Hand Held',
'Lunch Box') THEN 'Laptop'
ELSE 'Other'
END
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now