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
 Script Library
 Export to excel as csv format

Author  Topic 

missylloyd
Starting Member

2 Posts

Posted - 2007-03-19 : 06:34:23
Hi

I'm trying to export data to an excel spreadsheet in a csv format. Is this possible in SQL?

Thanks,

Missy.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-19 : 06:40:01
Yes. With external tool BCP it is.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

missylloyd
Starting Member

2 Posts

Posted - 2007-03-19 : 06:43:57
Damn, thats a bummer.
Thanks Peso.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-19 : 06:47:53
BCP is a part of SQL Server.
I meant you have to do something like this

bcp AdventureWorks.Sales.Currency out Currency.dat -c -U<login_id> -S<server_name\instance_name>

in a DOS window.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-19 : 07:10:09
Also, this is a forum for working queries only.
In the future, please use another forum better suited for your question.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -