Sunday, February 19, 2012

export the table to csv by command line

Hello:
Is it possible to export the table by command line. I
have try to use isql but the format is not like CSV.
Thanks a lot!
isql.exe is the old DB-Lib version and does not support SQL Server 2000
features, use osql.exe.
In fact, what you probably want is bcp.exe. Something like:
bcp mydb..mytable out c:\mytable.csv -c -t, -T
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Alan wrote:
> Hello:
> Is it possible to export the table by command line. I
> have try to use isql but the format is not like CSV.
> Thanks a lot!

No comments:

Post a Comment