Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Copying in data with field lengths [Table of Contents] Copying in data with a format file

Utility Guide

[-] Chapter 3 Using bcp to Transfer Data to and from Adaptive Server
[-] Examples: copying in data interactively
[-] Copying in data with delimiters

Copying in data with delimiters

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:


Copying in data with field lengths [Table of Contents] Copying in data with a format file