Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP... append to a file

Status
Not open for further replies.

elmo29

Programmer
Jul 28, 2000
50
GB
i need to write text
output query
write more text to a file from SQL server 7

I am using bcp, is it possible in anyway for bcp to append to a file rather than just overwrite it? or is there any way where I can 'add' 2 files together using xp_cmdshell??

Any help appreciated

Thanks
 
You could just use:

exec master.dbo.xp_cmdshell
"copy c:\a.txt + c:\b.txt c:\c.txt"



 
I thought that was a bit messy, isn't there a nicer way without me having to create 3 files and add them together each time?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top