Just noticed that Input may vary so following should work ...DECLARE @Var varchar(100) ='TEXT1 | GUID178877 ; TEXT2 | GUID888882 ; TEXT3 | GUID3878 ; TEXT4 | GUID768778784 'SELECT * INTO #temp FROM (SELECT a.x.value('.','VARCHAR(50)') col FROM (SELECT CAST('<r>'+REPLACE(@Var,';','</r><r>')+'</r>' AS XML)y ) bCROSS APPLY b.y.nodes('r') AS a(x))aSELECT STUFF((SELECT ';'+ LEFT(col,CHARINDEX('|',col)-1)FROM #temp FOR XML PATH ('')),1,1,'')DROP TABLE #temp
---------------Murali KrishnaYou live only once ..If you do it right once is enough.......