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 2000 Forums
 SQL Server Development (2000)
 BCP problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-03-14 : 09:08:46
Sica writes "How can I make BCP output the field names along with the data? I BCP out to a xls-file and need to have the field names be the first row in the table.
EX:
EXEC('exec master..xp_cmdshell ''BCP "' + @DatabaseName + '..' + @TableName + '" OUT ' + @Path + @TableName + '.xls /SSLQSERVER /Usa /Psa@sa -t \t /r\n /c -C ACP -q''')"
   

- Advertisement -