‎09-11-2018 07:31 PM
‎09-13-2018 05:47 PM
SELECT
...
Case
When tblComputersystem.Domainrole <= 1
Then 'Not server'
Else 'Server'
End As isServer,
tbldomainroles.Domainrolename, -- if you want to know more than "is/isn't server"
...
FROM
...
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
-- optional: if you want to know more than "is/isn't server"
Inner Join tbldomainroles On tbldomainroles.Domainrole = tblComputersystem.Domainrole
...
SELECT
...
Case
When tblPortableBattery.Name Is Not Null
Then 'Laptop'
Else 'Not laptop'
End As isLaptop,
TsysChassisTypes.ChassisName -- if you want to know the chassis type
...
FROM
...
Left Join tblPortableBattery On tblAssets.AssetID = tblPortableBattery.AssetID
-- optional: if you want to know the chassis type
Inner Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On tblSystemEnclosure.ChassisTypes = TsysChassisTypes.Chassistype
...
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now