s "\t" and used for all columns except the last one), and a newline (entered as "\n" and used for the last field in a row). Other terminators are: "\0" (the null terminator), "\" (backslash), and "\r" (Return). When choosing a terminator, be sure that its pattern does not appear in any of your character data. For example, if you used tab terminators with a string that contained a tab, bcp would not be able to identify which tab represents the end of the string. bcp always looks for the first possible terminator, so, in this example it would find the wrong one. When a terminator or prefix is present, it affects the length of data transferred. If the length of an entry being copied out to a file is less than the storage length, it is immediately followed by the terminator or the prefix for the next field. The entry is not padded to the full storage length (char, nchar, and binary data is returned from Adaptive Server already padded to the full length). When bcp is copying in from a file, data is transferred until either the number of bytes indicated in the "Length" prompt has been copied or the terminator is encountered. Once the number of bytes equal to the specified length has been transferred, the rest of the data is flushed until the terminator is encountered. When no terminator is used, the table storage length is strictly observed. 稵able 4-4 and Table 4-5 show the interaction of prefix lengths, terminators, and field length on the information in the file. "P" indicates the prefix in the stored table; "T" indicates the terminator; and dashes, (--) show appended spaces. An ellipsis (...) indicates that the pattern repeats for each field. The field length is 8 bytes for each column; "string" represents the 6-character field each time. ? Table 4-4: Adaptive Server char data ? Table 4-5: Other datatypes converted to char storage 稵he file storage type and length of a column do not have to be the same as the type and length of the column in the database table. [If the types and formats copied in are incompatible with the structure of the database table, the copy fails. 稦ile storage length generally indicates the maximum amount of data that can be transferred for the column, excluding terminators and/or prefixes. 稺hen copying data into a table, bcp observes any defaults defined for columns and user-defined datatypes. However, bcp ignores rules in order to load data at the fastest possible speed. 穊cp considers any data column that can contain a null value to be variable length, so use either a length prefix or a terminator to denote the length of each row of data. 稤ata written to a host file in its native format preserves all of its precision. datetime and float values preserve all of their precision, even when they are converted to character format. Adaptive Server stores money values to a precision of one ten-thousandth of a monetary unit. However, when money values are converted to character format, their character format values are recorded only to the nearest two places. 稡efore copying data that is in character format from a file into a database table, check the datatype entry rules in the Adaptive Server Reference Manual. Character data that is being copied into the database with bcp must conform to those rules. Note especially that dates in the undelimited format (yy)yymmdd may result in overflow errors if the year is not specified first. 稺hen you send host data files to sites that use terminals different from your own, inform them of the datafile_charset that you used to create the files.