‎03-11-2015 03:23 PM
Solved! Go to Solution.
‎03-12-2015 01:23 PM
Select
tParent.Assetname,
Stuff(( Select ', ' + tConnected.AssetName
From tblassetRelations
Inner Join tblAssets tConnected
On tblAssetRelations.ChildAssetID = tConnected.AssetID
Where tParent.AssetID = tblAssetRelations.ParentAssetID
Order By tConnected.AssetName
For xml path('')),1,1,'')
From tblassets tParent
Order By tParent.AssetName
‎03-12-2015 01:23 PM
Select
tParent.Assetname,
Stuff(( Select ', ' + tConnected.AssetName
From tblassetRelations
Inner Join tblAssets tConnected
On tblAssetRelations.ChildAssetID = tConnected.AssetID
Where tParent.AssetID = tblAssetRelations.ParentAssetID
Order By tConnected.AssetName
For xml path('')),1,1,'')
From tblassets tParent
Order By tParent.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now