October 15, 2010 at 3:18 pm
Greetings
lets say i have a table Employee like this
EmpID,EmpName
1 ,hatemand
i write a query that select * from Employee for xml autoso the out put will be in xml formati want some help to know how can i export the result to a xml file to be saved on my computer as i need to read the .xmls files from this folder and deserialize them in my .net application
thnx
October 15, 2010 at 3:50 pm
Either SSIS, OpenRowset (to a text file), or sp_OACreate to use the Scripting.FileSystemObject to write the data out.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 15, 2010 at 4:11 pm
Do you have to store it on the disk?
Why not storing the xml results in a separate table (file name in one column, xml data in a xml column, one row per "file") and read it from the table?
Question aside: What do you mean by "deserialize"?
October 15, 2010 at 4:19 pm
LutzM (10/15/2010)
Do you have to store it on the disk?Why not storing the xml results in a separate table (file name in one column, xml data in a xml column, one row per "file") and read it from the table?
Good questions... I was assuming that the XML file would need to be transferred to another party.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply