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.
Author |
Topic |
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2007-11-08 : 17:48:20
|
Is it possible to append data to the same file using BCP.Basically whenever the BCP is initiated it should append to the same csv file. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-08 : 17:49:56
|
No as bcp overwrites the file if it exists. So to append, you can use the type DOS command:type SmallFile.csv > BigFile.csvTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2007-11-08 : 18:17:32
|
This should work.Great idea.Thanks a lot |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-08 : 18:20:20
|
Oops, that should say type SmallFile.csv >> BigFile.csv since in this example BigFile.csv should already exist. You can also use wild cards: type *.* > BigFile.csv or type *.* >> BigFile.csv.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
|
|