title: SSIS export to CSV file failing
body: <p>I am trying to export the contents of a SQL Server 2005 table to a csv file using SSIS. In the Data Flow Task I have a OLE DB Source for the table and a Flat File Destination for the file.</p>
  
  <p>When copying the data I started getting a failure on one of the column on a certain row and following some investigation found the problem was with comma's in the data below</p>
  
  <p><strong>Data Issue (nvarchar255)</strong></p>
  
  <pre><code>errors code l075 showing,,,re test.
  </code></pre>
  
  <p><strong>OLE DB Source for Comment col</strong></p>
  
  <p><img src="https://i.stack.imgur.com/z62sq.png" alt="enter image description here"></p>
  
  <p><strong>Derived Column</strong></p>
  
  <p>Given that this was the issue I created a Derived Column object between the source and destination and destination objects and tried filtering out the comma's using a replace <code>REPLACE(Comment,","," ")</code> but the same column is still failing with the below errors.</p>
  
  <p><img src="https://i.stack.imgur.com/P6XxA.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/gUVXc.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/qmGnv.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/9bWEQ.png" alt="enter image description here"></p>
  
  <p><strong>Destination Component</strong></p>
  
  <p><img src="https://i.stack.imgur.com/xdiCD.png" alt="enter image description here"></p>
  
  <p><strong>Exception</strong></p>
  
  <p><img src="https://i.stack.imgur.com/7kG6M.png" alt="enter image description here"></p>
  
  <p>[Inspection Failures  Destination [206]] Error: Data conversion failed. 
  The data conversion for column "Comment" returned status value 4 and 
  status text "Text was truncated or one or more characters had no 
  match in the target code page.".</p>
  
  <p>[Inspection Failures  Destination [206]] Error: Cannot copy 
  or convert flat file data for column "Comment".</p>
  
  <p>[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.<br>
  The ProcessInput method on component "Inspection Failures<br>
  Destination" (206) failed with error code 0xC02020A0 while 
  processing input "Flat File Destination Input" (207). The 
  identified component returned an error from the ProcessInput 
  method. The error is specific to the component, but the error
   is fatal and will cause the Data Flow task to stop running.<br>
  There may be error messages posted before this with more 
  information about the failure.</p>
  
  <p>[Inspecton Failures Source [128]] Error: The attempt to 
  add a row to the Data Flow task buffer failed with error 
  code 0xC0047020.</p>
  
  <p>[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.<br>
  The PrimeOutput method on component "Inspecton Failures Source"
   (128) returned error code 0xC02020C4.  The component returned 
  a failure code when the pipeline engine called PrimeOutput(). 
  The meaning of the failure code is defined by the component, 
  but the error is fatal and the pipeline stopped executing.<br>
  There may be error messages posted before this with more 
  information about the failure.</p>