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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 BCP Export output

Author  Topic 

dnf999
Constraint Violating Yak Guru

253 Posts

Posted - 2007-12-05 : 11:33:16
Hi I'm fairly new to the BCP export method and I need to alter the parameters to enable the header and file to be output in Pipe delimiters. So far I can't find the exact comments to use in BOL to execute this:

My Code is:

EXEC master..xp_cmdshell 'bcp "SELECT * FROM TEST_Database.dbo.All_People" QUERYOUT c:\test.txt -c -S UK99287 -T'


Please can somebody advise how I can change this to export pipe delimited with headers.

Many thanks!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-12-05 : 11:48:05
http://weblogs.sqlteam.com/mladenp/archive/2006/07/25/10771.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -