SSIS 2008: Flat file destination - Header records with out text qualifiers

  • Hi,

    I'm trying to export data from SQL Server tables to a text file (with comma as delimiter) with text qualifier. My output looks like:

    "Col1","Col2","Col3"

    "1","New York","USA"

    "2","London","England"

    "3","Chicago","USA"

    "4","Paris","France"

    Here the first row is the column header and remaining are the output of a query. I use " as the text qualifier because Col2 and Col3 may contain comma. I can't change the delimiter as the downstream system expects "," separated values.

    Is there any way where I can get my output as given below:

    Col1,Col2,Col3

    "1","New York","USA"

    "2","London","England"

    "3","Chicago","USA"

    "4","Paris","France"

    There should not be text qualifiers for header rows.

  • If your column headings will stay the same, you can define them in the Flat File Destination. http://msdn.microsoft.com/en-us/library/ms188431.aspx

    That way you won't have to write them yourself to the file and you avoid the text qualifier problem.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply