The information in this article applies to:
SUMMARYThis article describes how to customize the bulk copy program (BCP) format file to strip off unwanted quotation marks around the character strings in the data file. MORE INFORMATION
It is possible to customize the BCP format file to strip off quotation
marks that surround character strings in the user's ASCII data file.
This process requires modifying the terminators to include a
backslash+quotation mark (\") to interpret the quotation mark as a
literal. If the first field in the data file is within quotation marks,
you must add a new line to the BCP format file to dispose of the first
quotation mark.
Data File"John","Doe",33,"New York""Jane","Doe",31,"Seattle" Format File
Perform the numbered steps below to modify the format file to remove the quotation marks:
NOTE: The first line of the BCP.FMT refers to the version of the program. When running the version 1.1 or 1.11 of BCP this value is 4.0. In SQL Server 4.2 this value is 4.2. For similar examples with Microsoft SQL Server version 4.21a, 6.0 and 6.5, please see the following article(s) in the Microsoft Knowledge Base: Q132463 : INF: Using BCP When Data is in Quotation Marks Additional query words: 4.20 quotes Windows NT
Keywords : kbtool SSrvBCP |
Last Reviewed: March 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |