title: Bulk insert fmt text qualifier
body: <p>I've a BULK INSERT task that takes data from a csv and imports into a table.  Only problem is that one of the columns can contain a comma, so the import doesn't work as expected.</p>
  
  <p>I've tried to fix this by creating a format (fmt) file, the contents of which I've detailed below:-</p>
  
  <pre><code>9.0
  6
  1       SQLCHAR       0       50      ","       1     "Identifier"                                 Latin1_General_CI_AS
  2       SQLCHAR       0       50      ","       2     "Name"                                             Latin1_General_CI_AS
  3       SQLCHAR       0       50      ","       3     "Date of Birth"                                            Latin1_General_CI_AS
  4       SQLCHAR       0       50      ","       4     "Admission"                                                Latin1_General_CI_AS
  5       SQLCHAR       0       50      ","       5     "Code"                               Latin1_General_CI_AS
  6       SQLCHAR       0       50      "\r\n"   6     "Length"                                                      Latin1_General_CI_AS
  </code></pre>
  
  <p>The column causing me pain is column 2 "Name".</p>
  
  <p>I've tried a couple of things to identify the column as being text qualified and containing a comma but I'm not getting the result I want.</p>
  
  <p>If I change to the following:-</p>
  
  <p><code>"\","</code> - I get something like this -- "Richardson, Mat</p>
  
  <p>This isn't correct, so I tried this instead, as suggested on some other forums / sites:-</p>
  
  <pre><code>"\",\""
  </code></pre>
  
  <p>This doesn't work at all and actually gives me the error </p>
  
  <pre><code>Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)".Bulk load: An unexpected end of file was encountered in the data file.
  </code></pre>
  
  <p>I've tried a few other combinations and just can't get this right.  Any help or guidance would  be massively appreciated.</p>