/* generate xml fragment for RDCMANAGER groups run this scrript on hcimon */ USE [ControlCenter] DECLARE @tpl VARCHAR(max)=' @ou@ - @name@ @dns@ '; SELECT e.[EN_designation] , s.[SE_designation] , s.[SE_DNS] --,s.* , REPLACE(REPLACE(REPLACE(@tpl, '@name@',[s].[SE_designation] ), '@dns@',[s].[SE_DNS]),'@ou@', [s].[SE_OU_code] ) AS fragment FROM [dbo].[Server] s JOIN [dbo].[Entity] e ON e.[EN_id] = s.[SE_entity] WHERE [e].[EN_designation] IN ( --'Amavita' --'Coop-Vitality' 'Sun Store' ) ORDER BY [e].[EN_designation], [s].[SE_designation]