When you copy data in or out using the -n (native format) or -c (character format) parameters, bcp prompts you only for your password, unless you supplied it with the -P parameter. If you do not supply either the -n, -c or -f formatfile parameter, bcp prompts you for information for each field in the table or view.
Each prompt displays a default value, in brackets, which you can accept by pressing Return. The prompts include:
The file storage type, which can be character or any valid Adaptive Server datatype
The prefix length, which is an integer indicating the length in bytes of the following data
The storage length of the data in the file for non-NULL fields
The field terminator, which can be any character string
Windows NT – Scale and precision for numeric and decimal data types
The row terminator is the field terminator of the last field in the table, view, or file.
The bracketed defaults represent reasonable values for the datatypes of the field in question. For the most efficient use of space when copying out to a file:
Use the default prompts
Copy all data in the datatypes defined by their table
Use prefixes as indicated
Do not use terminators
Accept the default lengths
Table 3-3 shows the bcp prompts, defaults, and the possible alternate user responses:
Prompt |
Default provided |
Possible user response |
---|---|---|
File Storage Type |
Use database storage type for most fields except:
|
char to create or read a human-readable file; any Adaptive Server datatype where implicit conversion is supported. |
Prefix Length |
|
0 if no prefix is desired; otherwise, defaults are recommended. |
Storage Length |
|
Default values, or greater, are recommended. |
Field or Row Terminator |
None |
Up to 30 characters, or one of the following:
|