locked
Column names in header row have quotes - need the quotes removed RRS feed

  • Question

  • Environment:  Both BIDS 2005 and BIDS for SQL 2008 R2 (VS 2008 - 9.0.30729.4462)

    I've set up a simple data flow task to dump query results to a flat file (.CSV).  I figured out how to get the string/text data surrounded by double-quotes, but the setting also quotes the column names in the header row (I checked "column names in first data row").

    How can I get rid of the double-quotes just for teh column names?

    Thanks!

    -Peter

    Tuesday, February 21, 2012 5:47 PM

Answers

All replies

  • Hi Peter,

    Build the header row outside this task. So use append to file method to just add the data in quotes.


    Arthur My Blog

    Tuesday, February 21, 2012 6:48 PM
  • Thank you for your response, Aurthur.  I understand that is a possible solution, but I can't believe that this far along in the evolution of DTS/SSIS that we would need a kludge like that just to get quotes off of the column headers.  I guess we can just write that off as another "quirk" of SSIS.  Sigh.

    -Peter

    Wednesday, February 22, 2012 3:42 PM
  • BTW, I just used the Header Row text box in the flat file destination to contain the column names.  It's still kludgy, but simpler than writing a script task.
    Wednesday, February 22, 2012 9:05 PM
  • Hi peter daniels,

    I suggest you can use derived column transformation to remove double-quotes, for more details about it, please see:
    http://stackoverflow.com/questions/6210744/how-to-replace-double-quotes-in-derived-column-in-ssis 

    Thanks,
    Eileen

    • Marked as answer by Eileen Zhao Wednesday, February 29, 2012 1:20 AM
    Thursday, February 23, 2012 6:34 AM