→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎11-19-2014 07:48 PM
Solved! Go to Solution.
‎11-20-2014 02:29 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers.Displayname,
tblADusers.Department,
tblAssets.IPAddress,
Case
When tblAssetCustom.PurchaseDate Is Not Null And
tblAssetCustom.PurchaseDate <> '' Then DateDiff(year,
tblAssetCustom.PurchaseDate, GetDate())
Else DateDiff(year, tblBIOS.ReleaseDate, GetDate()) End As AgeInYears,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
‎11-20-2014 02:29 PM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblADusers.Displayname,
tblADusers.Department,
tblAssets.IPAddress,
Case
When tblAssetCustom.PurchaseDate Is Not Null And
tblAssetCustom.PurchaseDate <> '' Then DateDiff(year,
tblAssetCustom.PurchaseDate, GetDate())
Else DateDiff(year, tblBIOS.ReleaseDate, GetDate()) End As AgeInYears,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now