Character format  Changing the defaults: interactive bcp

Chapter 4: Using bcp to Transfer Data to and from Adaptive Server

Changing terminators from the command line

Terminators are the characters that separate data fields (field terminators). The row terminator is the field terminator of the last field in the table or file. Use the -tfield_terminator and -rrow_terminator command line options with the character format option (-c) to change the terminators from the command line.

The following example uses the comma (,) as the field terminator and return (\r) as the row terminator.

This bcp command line produces the following information:

0736,New Age Books,Boston,MA
0877,Binnet  & Hardley,Washington,DC
1389,Algodata Infosystems,Berkeley,CA

NoteYou can use the -t and -r options to change the default terminators without including the character option (-c).





Copyright © 2005. Sybase Inc. All rights reserved. Changing the defaults: interactive bcp

View this book as PDF