Add a root element to the Auto XML mode so your XML stream is well-formed, and give the root node a meaningful name with the ROOT keyword.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – What is XML Day 30 of 35
In What is XML Day 30, we use FOR XML RAW to output the Employee table as XML, then add ROOT to get a root node and well-formed XML.
EXECUTE AS OWNER in Stored Procedures: Power and Pitfalls
A procedure with owner rights can write to tables its caller cannot touch. Watch the identity change, and see how one careless parameter hands out too much.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – What is XML? – Day 29 of 35
What is XML? A simple look at XML files as text documents, how they show the structure of your data and how to read well-formed XML at a glance.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – Structured Error Handling – Day 28 of 35
Structured error handling explained with a road detour: instead of giving up at a level 16 error, your code can take another route with TRY and CATCH.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – SQL Server Error Messages – Day 27 of 35
How SQL Server error messages work: SQL Server catches most problems before your code runs, and raises an error when a statement cannot run.
SQL SERVER – Table Valued Functions – Day 26 of 35
Let us learn about table valued functions. Every day one winner from the United States will get Joes 2 Pros Volume 4.






