Link to home
Start Free TrialLog in
Avatar of dkcoop03
dkcoop03Flag for United States of America

asked on

I have SQL Server 2005 Management Studio Express and need to export a table to CSV. How can I Do this?

I have SQL Server 2005 Management Studio Express installed on my machine.  I need to export a table in our DB to CSV format.  How can I do this?
Avatar of Cvijo123
Cvijo123
Flag of Croatia image

Position yourself at your database in Managment studio then right click on database name then Tasks -> Export data

after that should be simple just follow wizard and u are done.
Avatar of dkcoop03

ASKER

Management Studio Express does not have the Export data option on the Tasks menu.  I was wondering if there was another way to do it.
do you mybe have bcp.exe file ?
(located whre u installed your SQL Server .. usually in
C:\Program Files\Microsoft SQL Server\90\Tools\BinnC:\Program Files\Microsoft SQL Server\90\Tools\Binn )

I do have the bcp.exe file but the database where the table resides is on a different server.  How, using BCP, do I specify a server?  I use Windows authentication to connect to the DB in Mgmt Studio Express, but I haven't found any syntax that tells me how to specify a remote server in bcp.
should be same way u do it in management studio (ip or name)
BCP master..sysobjects out c:\sysobjects.txt -c -t; -T S<servername>

Open in new window


btw. one time i found this article to export data for excel file.

From excel u can do anything

http://weblogs.sqlteam.com/mladenp/archive/2006/07/25/10771.aspx
ASKER CERTIFIED SOLUTION
Avatar of Cvijo123
Cvijo123
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial