How do I get “select for xml” to output to several files?

Our customer is complaining that our export file is too long; they would like us to split the export into many files with no more than “n” records per file. Is there a way of doing this with “select for xml”

At persent we are using Sql Server 2005 for this project.

(If this is too hard, I can always post process the single large file to split it up)

Answers


I don't think there's anything simple'n'easy you can do here.

My approach would probably be to limit the number of rows returned by each SELECT statement (by partioning the data returned by some criteria, e.g. by date or location or something), and then put those smaller XML streams into files one by one. Doable, but not very elegant or sophisticated..


Need Your Help

How to send message to a specific device by spring websocket

javascript spring websocket spring-websocket

I am fairly new with Spring websocket. I have a simple demo below:

Database errors in Quantum Grid demos in Delphi XE Professional

database delphi demo paradox quantumgrid

Whenever I open one of the Quantum Grid demos in Delphi XE Pro (on Windows 7 32-bit), the following error is displayed for every table (I think) in the project: