sql data to xml file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: snickerskid (snickerskid_at_discussions.microsoft.com)
Date: 01/15/05


Date: Fri, 14 Jan 2005 16:29:01 -0800

i want to execute the following t-sql statement:
select * from customers for xml auto, elements

i want for the results of the above t-sql statement to be saved to a file.
can anyone tell me how to do that from SQL Server? is that possible. i
tried running it through sp_makewebtask but unfortunately that only works for
small amounts of data. i need to be able to export up to 100,000 rows. any
advice? and are there any solid examples out there?



Relevant Pages

  • Re: sql data to xml file
    ... You can use sp_OACreate to create objects of FileSystemObject and call its ... but you should be a member of sysadmin role to execute this extended ... > i want for the results of the above t-sql statement to be saved to a file. ...
    (microsoft.public.sqlserver.xml)
  • RE: FTPing and Calling an EXE from a SQL Statement
    ... T-SQL statement and you would like to know whether it is possible for you ... to execute exe file directly from T-SQL statement. ... exec master..xp_cmdshell 'echo >>c:\ftp.input' ... you could use xp_cmdshell to execute the exe ...
    (microsoft.public.sqlserver.programming)
  • Estimate the Time for SQL query Execution
    ... Is there any way to estimate the time required to execute a T-SQL statement? ... I need to set the command time out by calculating the time for T-SQL ...
    (microsoft.public.dotnet.languages.csharp)