Top "For-xml" questions

Query to get XML output for hierarchical data using FOR XML PATH in SQL Server

I have a table with columns NodeId, NodeName, ParentNodeId and I want to ouput entire table data in the form …

sql sql-server xml tsql for-xml
SQL Server 2000 XML PATH('') error

SELECT **FIELDS** AS [text()] --Stops the XMLPATH line rendering output as XML FROM #temp WHERE **CONDITIONS** FOR XML PATH('') …

sql sql-server-2005 tsql sql-server-2000 for-xml