In the following example, bcp copies data
from the file newpubs into the table pubs2..publishers.
In the newpubs file, each field in a row ends
with a tab character (\t
)
and each row ends with a newline terminator (\n
),
as follows:
1111 Stone Age Books Boston MA 2222 Harley & Davidson Washington DC 3333 Infodata Algosystems Berkeley CA
Since newpubs contains all character data, you can use the character command-line flag and specify the terminators with command line options:
In UNIX platforms:
bcp pubs2..publishers in newpubs -c -t\\t -r\\n
In Windows NT:
bcp pubs2..publishers in newpubs -c -t\t -r\n