[dba-SQLServer] Quotes in delimited data

Stuart McLachlan stuart at lexacorp.com.pg
Sun Sep 5 21:37:38 CDT 2004


On 5 Sep 2004 at 20:34, John W. Colby wrote:


 Can BCP be told to ignore the quotes? 

You need to edit the BCP format file to specify the delimiters for each 
field.

For a four field inport where the fields are
1 - Numeric
2 - Quoted string
3 - Quoted string
4 - Numeric

( ie 111,"John","Colby",99)

1    SQLCHAR    0    0     ",\""     1     f1     ""
2    SQLCHAR    0    0     "\",\""   2     f2     ""
3    SQLCHAR    0    0     "\","     3     f3     ""
4    SQLCHAR    0    0     "\"\n"   4     f4      ""

-- 
Stuart





More information about the dba-SQLServer mailing list