728x90
declare @xml nvarchar(max)
 
set @xml = '(
   select * from Orders
   for xml auto,elements,root('AllOrders'))'
  
exec writetofile @xml,'c:AllOrders.xml' 

+ Recent posts