→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎05-11-2020 09:40 AM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssetCustom.State,
tblAssetCustom.Warrantydate,
tblAssetComments.Comment,
tblAssetComments.AddedBy,
tblAssetComments.Added,
tblAssetCustom.Custom1 As Custom11
From tblAssets
Left Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Left Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Full Join tblAssetComments On tblAssets.AssetID = tblAssetComments.AssetID
Right Join (Select tblAssetComments.AssetID,
Max(tblAssetComments.Added) As Max
From tblAssetComments
Group By tblAssetComments.AssetID) SubQuery On SubQuery.Max =
tblAssetComments.Added And SubQuery.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1 And tblAssetCustom.Custom1 = 'yes'
Order By tblAssetComments.Added
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now