August 29, 2008 at 9:30 am
Hi,
I am using following code for data transfer to flat file:
declare @sql varchar(8000)
select @sql = 'bcp demo.scheme.test3 out c:\test20.txt -T -c -t,'
select @sql
exec master..xp_cmdshell @sql
it works fine. However when I change comma seprator to pipe
declare @sql varchar(8000)
select @sql = 'bcp demo.scheme.test3 out c:\test20.txt -T -c -t|'
select @sql
exec master..xp_cmdshell @sql
it throws an error:
The syntax of the command is incorrect.
Any idea why?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply