→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎11-13-2016 02:14 PM
Solved! Go to Solution.
‎11-17-2016 12:37 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Model,
Case When (TsysChassisTypes.ChassisName Like '%Docking Station%' Or
TsysChassisTypes.ChassisName Like '%Notebook%' Or
TsysChassisTypes.ChassisName Like '%Laptop%' Or
TsysChassisTypes.ChassisName Like '%Portable%') Then 'Laptop'
When (TsysChassisTypes.ChassisName Like '%Mini Tower%' Or
TsysChassisTypes.ChassisName Like '%Space-Saving%' Or
TsysChassisTypes.ChassisName Like '%Desktop%' Or
TsysChassisTypes.ChassisName Like '%Tower%') Then 'Desktop' Else 'Unknown'
End As [Chassis Type],
tblAssets.Username,
tblAssetCustom.Warrantydate As [Warranty Expiration],
LastUserOn.AssetCount As Computers
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join (Select a.Userdomain,
a.Username,
Count(*) As AssetCount
From tblAssets As a
Group By a.Userdomain,
a.Username) As LastUserOn On LastUserOn.Userdomain = tblAssets.Userdomain
And LastUserOn.Username = tblAssets.Username
Where tblAssetCustom.Warrantydate <= '12/31/2017' And
TsysChassisTypes.ChassisName Not Like '%Rack%' And
TsysChassisTypes.ChassisName Not Like '%Main%' And tblAssetCustom.State = 1
Order By TsysChassisTypes.ChassisName,
tblAssets.AssetName
‎11-17-2016 12:37 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Model,
Case When (TsysChassisTypes.ChassisName Like '%Docking Station%' Or
TsysChassisTypes.ChassisName Like '%Notebook%' Or
TsysChassisTypes.ChassisName Like '%Laptop%' Or
TsysChassisTypes.ChassisName Like '%Portable%') Then 'Laptop'
When (TsysChassisTypes.ChassisName Like '%Mini Tower%' Or
TsysChassisTypes.ChassisName Like '%Space-Saving%' Or
TsysChassisTypes.ChassisName Like '%Desktop%' Or
TsysChassisTypes.ChassisName Like '%Tower%') Then 'Desktop' Else 'Unknown'
End As [Chassis Type],
tblAssets.Username,
tblAssetCustom.Warrantydate As [Warranty Expiration],
LastUserOn.AssetCount As Computers
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join (Select a.Userdomain,
a.Username,
Count(*) As AssetCount
From tblAssets As a
Group By a.Userdomain,
a.Username) As LastUserOn On LastUserOn.Userdomain = tblAssets.Userdomain
And LastUserOn.Username = tblAssets.Username
Where tblAssetCustom.Warrantydate <= '12/31/2017' And
TsysChassisTypes.ChassisName Not Like '%Rack%' And
TsysChassisTypes.ChassisName Not Like '%Main%' And tblAssetCustom.State = 1
Order By TsysChassisTypes.ChassisName,
tblAssets.AssetName
‎11-16-2016 08:15 AM
‎11-14-2016 04:05 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Model,
Case When (TsysChassisTypes.ChassisName Like '%Docking Station%' Or
TsysChassisTypes.ChassisName Like '%Notebook%' Or
TsysChassisTypes.ChassisName Like '%Laptop%' Or
TsysChassisTypes.ChassisName Like '%Portable%') Then 'Laptop'
When (TsysChassisTypes.ChassisName Like '%Mini Tower%' Or
TsysChassisTypes.ChassisName Like '%Space-Saving%' Or
TsysChassisTypes.ChassisName Like '%Desktop%' Or
TsysChassisTypes.ChassisName Like '%Tower%') Then 'Desktop' Else 'Unknown'
End As [Chassis Type],
tblAssets.Username,
tblAssetCustom.Warrantydate As [Warranty Expiration]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblAssetCustom.Warrantydate <= '12/31/2017' And
TsysChassisTypes.ChassisName Not Like '%Rack%' And
TsysChassisTypes.ChassisName Not Like '%Main%' And tblAssetCustom.State = 1
Order By TsysChassisTypes.ChassisName,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now