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
 BCP Tutorial or Example

Author  Topic 

zwheeler
Starting Member

25 Posts

Posted - 2011-08-11 : 13:03:29
Hi

Does anyone have a very simple example or tutotial of using bcp to export a query

thanks in advance

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-08-11 : 13:06:39
bcp "select c1,c2,c3 from db1.dbo.tbl1 where c4 = 1" queryout E:\someFile.csv -T -Sserver1\instance1 -c -t, -r\r\n

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -