Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query Result to Excel Worksheet

Author  Topic 

rpc86
Posting Yak Master

200 Posts

Posted - 2007-06-29 : 01:10:27
hi guys,

How could I export the result from Query? I'd like to run the query and at the same time the result must be saved in Excel Worksheet. is this possible? How?

Thank you very much.

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-29 : 01:13:54
Use BCP to export data in tab-delimited excel file.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

rpc86
Posting Yak Master

200 Posts

Posted - 2007-06-29 : 01:17:58
I dont know BCP. Could you give me a sample code?

Thanks.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-06-29 : 01:19:36
see http://www.simple-talk.com/sql/t-sql-programming/sql-server-excel-workbench/


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-29 : 01:22:27
This thread is perfect for you: [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

rpc86
Posting Yak Master

200 Posts

Posted - 2007-06-29 : 01:45:27
Ok thank you guys. Those are great help
Go to Top of Page
   

- Advertisement -