May 15, 2010 at 6:10 am
Hi,
I need to extract the Data pipeline as Column Terminator and : colon as
Row terminator...
My Query IS
declare @sql varchar(8000)
declare @path varchar(8000)
set @path ='D:\STOCK_12_05_2010.txt'
select @sql = 'bcp "set fmtonly off SELECT CODE,LIST_PRICE, WEB_PRICE FROM db.dbo.table " queryout '+@path+' -c -t"|"^ -T -S' + @@servername
exec master..xp_cmdshell @sql
IN EXPORT WIZARD WE CAN BUT I NEED IN BCP QUERY
May 15, 2010 at 5:48 pm
Saravanan_tvr (5/15/2010)
Hi,I need to extract the Data pipeline as Column Terminator and : colon as
Row terminator...
My Query IS
declare @sql varchar(8000)
declare @path varchar(8000)
set @path ='D:\STOCK_12_05_2010.txt'
select @sql = 'bcp "set fmtonly off SELECT CODE,LIST_PRICE, WEB_PRICE FROM db.dbo.table " queryout '+@path+' -c -t"|"^ -T -S' + @@servername
exec master..xp_cmdshell @sql
IN EXPORT WIZARD WE CAN BUT I NEED IN BCP QUERY
Lookup the -r argument of BCP in Books Online.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply