→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎02-12-2016 07:13 PM
Solved! Go to Solution.
‎02-16-2016 06:06 PM
Select Top 1000000 LTrim(RTrim(Coalesce(tblAssetCustom.Manufacturer, N'') +
N' ' + Coalesce(tblAssetCustom.Model, N''))) + ' / Retirement: ' + Case
When tblAssetCustom.Custom20 Is Not Null And tblAssetCustom.Custom20 <>
'' Then tblAssetCustom.Custom20 Else 'unknown' End As Compmodel,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1
Group By LTrim(RTrim(Coalesce(tblAssetCustom.Manufacturer, N'') + N' ' +
Coalesce(tblAssetCustom.Model, N''))) + ' / Retirement: ' + Case
When tblAssetCustom.Custom20 Is Not Null And tblAssetCustom.Custom20 <>
'' Then tblAssetCustom.Custom20 Else 'unknown' End
Order By Total Desc,
Compmodel
‎02-16-2016 06:06 PM
Select Top 1000000 LTrim(RTrim(Coalesce(tblAssetCustom.Manufacturer, N'') +
N' ' + Coalesce(tblAssetCustom.Model, N''))) + ' / Retirement: ' + Case
When tblAssetCustom.Custom20 Is Not Null And tblAssetCustom.Custom20 <>
'' Then tblAssetCustom.Custom20 Else 'unknown' End As Compmodel,
Count(tblAssets.AssetID) As Total
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblAssetCustom.State = 1 And tblAssets.Assettype = -1
Group By LTrim(RTrim(Coalesce(tblAssetCustom.Manufacturer, N'') + N' ' +
Coalesce(tblAssetCustom.Model, N''))) + ' / Retirement: ' + Case
When tblAssetCustom.Custom20 Is Not Null And tblAssetCustom.Custom20 <>
'' Then tblAssetCustom.Custom20 Else 'unknown' End
Order By Total Desc,
Compmodel
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now