[dba-SQLServer] Quotes in delimited data

John W. Colby jwcolby at colbyconsulting.com
Mon Sep 13 10:18:30 CDT 2004


OK, now for a 660 field table?

;-)

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Sunday, September 05, 2004 10:38 PM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Quotes in delimited data


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


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list