Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have create a page display few details.
But the query takes more time to execute the page.
So I have planed to convert the query data to XML format and store it in a table.
Then converting the XML data to display in page.

By executing the this line i can get the XML data but how to store the same in different table.
SQL
Select DT=Getdate() into #TEMP
SELECT * from #TEMP FOR XML AUTO
SELECT * from #TEMP FOR XML RAW


Also kinldy explain me what is difference between XML AUTO and XML RAW

Kindly suggest or guide me on this.
Posted

Quote:
The RAW mode generates a single <row> element per row in the rowset that is returned by the SELECT statement. You can generate XML hierarchy by writing nested FOR XML queries.

The AUTO mode generates nesting in the resulting XML by using heuristics based on the way the SELECT statement is specified. You have minimal control over the shape of the XML generated. The nested FOR XML queries can be written to generate XML hierarchy beyond the XML shape that is generated by AUTO mode heuristics.

More at: http://msdn.microsoft.com/en-us/library/ms178107%28v=sql.105%29.aspx[^]
 
Share this answer
 
Comments
RedDk 4-Mar-13 12:49pm    
Hey ML,

I saw a post yesterday, deep in the stack somewhere here in CPQA, that suggested there was a temp file of this .xml output. Is that notion true? And if it is, which temp might contain it? Sorry AN for hijacking your thread a little ...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900