It adds the following things in the output. It gives the same result in a text format. The top-level FOR XML clause can be used only in the SELECT statement. Speaking at Community Events - More Thoughts. Help us identify new roles for community members, Proposing a Community-Specific Closure Reason for non-English content. Sql Linq lambdaGROUP\u CONCAT/STRING\u AGGXML,sql,linq,lambda,substring,for-xml-path,Sql,Linq,Lambda,Substring,For Xml Path, EmployeeId EmployeeName ItemName 4 Ganesh Key Board 4 Ganesh Processor 1 Jignesh Key Board 1 Jignesh Mouse 1 Jignesh Processor 3 Rakesh Key Board Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future. They do not affect the results of any subsequent queries. I prepared sample tables. You have minimal control over the shape of the XML generated. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Fetch child table values using Jinja tags. Set @TableTail = '