I did not do all my homework and is totally new to XML, but would like to know how to get the results of "select name,number,detail from mytable" into a "mytable.xml" (text) file with all the correct headers, roots and structure etc. A client requested the data normally sent as a delimited text file to be in XML. "select * from mytable for xml auto,elements" sounds like an option, but I'm battling. (I used to 'cut-a-paste' the (small) results from query analyzer into a file). I appreciate the help.