Hi all,It's quite rare that I have to concatenate rows into a string but when I do I usually do a sub-select with a FOR XML PATH('') clause.I thought about trying to turn those sub-selects into a nice OUTER APPLY but can't seem to get over a slight hurdle -- that the xml column returned doesn't have a name.Here's my test set. Any advice would be appreciated.IF OBJECT_ID('tempDb..#employee') IS NOT NULL DROP TABLE #employeeIF OBJECT_ID('tempDb..#roles') IS NOT NULL DROP TABLE #rolesIF OBJECT_ID('tempDb..#employeeRoles') IS NOT NULL DROP TABLE #employeeRolesCREATE TABLE #employee ( [employeeId] INT PRIMARY KEY , [name] VARCHAR(255) )CREATE TABLE #roles ( [roleId] INT PRIMARY KEY , [roleName] VARCHAR(255) )CREATE TABLE #employeeRoles ( [employeeID] INT -- FOREIGN KEY , [roleID] INT -- FOREIGN KEY PRIMARY KEY([employeeID], [roleID]) )/* Data */INSERT #employee ([employeeID], [name]) SELECT 1, 'Fred Flintstone'UNION SELECT 2, 'Barney Rubble'INSERT #roles ([roleID], [roleName]) SELECT 1, 'Saftey Inspector'UNION SELECT 2, 'Handy Man'UNION SELECT 3, 'Plumber'INSERT #employeeRoles ([employeeID], [roleID]) SELECT 1, 1 -- Fred (Saftey)UNION SELECT 1, 3 -- Fred (Plumber)UNION SELECT 2, 2 -- Barney (Handy Man)/* FOR XML SUB_SELECT */SELECT [employee] , LEFT([roles], LEN([roles]) -1) AS [Roles]FROM ( SELECT e.[name] AS [employee] , [Roles] = ( SELECT [rolename] + ', ' FROM #employeeRoles er JOIN #roles r ON r.[roleID] = er.[roleID] WHERE er.[employeeID] = e.[employeeID] FOR XML PATH('') ) FROM #employee e ) rep/* Attempt at OUTER APPLY */SELECT e.[name] , rl.[roles]FROM #employee e OUTER APPLY ( SELECT [rolename] + ', ' AS [ROLES] FROM #employeeRoles er JOIN #roles r ON r.[roleID] = er.[roleID] WHERE er.[employeeID] = e.[employeeID] FOR XML PATH('') ) rlI always get the error Msg 8155, Level 16, State 2, Line 76No column name was specified for column 1 of 'rl'.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION