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
 Transact-SQL (2000)
 remove BCP output file white spaces or empty lines

Author  Topic 

fredong
Yak Posting Veteran

80 Posts

Posted - 2007-09-15 : 18:17:45
Hi,
I am using BCP to output my XML file. Unfortunately, the output file has multiple empty lines or whit spaces with huge gap. Does anybody what is the syntax to remove these empty spaces? Basically I want it to be a one straight without any leading or trailing spaces. Below is my code. Thanks.


Set @cmd ='bcp "SELECT XML1+XML2+XML3+XML4+XML5 from tableA(nolock) order by ROWID ASC " queryout '
+ @strExportPath + @strFileName + ' -w -r "" -S' + @strServerName + ' -T'

PRint @cmd

exec master..xp_cmdshell @cmd

k

Kristen
Test

22859 Posts

Posted - 2007-09-16 : 04:00:52
At the very least I reckon you need some more parameters to BCP.

See: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=SQL+Server+2000+XML

Kristen
Go to Top of Page
   

- Advertisement -