Showing posts with label statement. Show all posts
Showing posts with label statement. Show all posts

Thursday, March 22, 2012

Exporting data as XML file

To get the data from the database table as an XML file we will use " for xml" clause in sql statement in SQLSERVER.

But i am not able to generate the following things in that XML file.

please let me know how to get the following details in XML file using sql statement?

<?xml version="1.0" encoding="UTF-8" ?>

- <listOfIDXRefData xmlns=some url here>

Try the T-SQL forum http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=85&SiteID=1

-Jamie

Friday, February 24, 2012

export to Excel

is there any way to export the result of the SQL statement to Excel or CSV?

Jassim:

Can you use SSIS (DTS in SQL Server 2000) provides an interface that handles this. Will this work for you? There are a number of ways to do this; it's just a matter of which way is best. BCP also can do this. You can also manually wire the queries so that proper punctuation is added.


Dave

|||

ya..dave has given all the options..

but if u just want to run a query and get the result in excel..executing it in management studio/query analyzer , set the query output to file .. from the menu..query->result to ->file , then run it , u can save it in any format.... .rpt is the default...

|||

How about export to Excel with password using TSQL?

export to Excel

is there any way to export the result of the SQL statement to Excel or CSV?

Jassim:

Can you use SSIS (DTS in SQL Server 2000) provides an interface that handles this. Will this work for you? There are a number of ways to do this; it's just a matter of which way is best. BCP also can do this. You can also manually wire the queries so that proper punctuation is added.


Dave

|||

ya..dave has given all the options..

but if u just want to run a query and get the result in excel..executing it in management studio/query analyzer , set the query output to file .. from the menu..query->result to ->file , then run it , u can save it in any format.... .rpt is the default...

|||

How about export to Excel with password using TSQL?