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
 Import/Export (DTS) and Replication (2000)
 BCP - Row /Terminator-Delimeter

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-22 : 08:56:56
roland writes "I'm trying to use the bcp to export data from MS SQL Server to a text file, to which i followed the code in your sample:
bcp "select * from pubs..authors" queryout authors.txt -S - U sa -P pw -C when i opened the authors.txt file the format that was exported to the authors.txt was in one line separated by a field terminator of comma. how can i make this file to have each information separated by a new line so that the next information or row information would be in the next line? I try to use the
format -r which is the row terminator but still the results all are in one line separated by a black block.

Roland"

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-09-22 : 10:03:47
it should be -c not -C.
-c will out the information with tab as column delimeter and new line as row delimeter..
READ BOL on topic 'bcp utility, described'

- Sekar
Go to Top of Page
   

- Advertisement -