SSIS flat file add double quotes

CzarR 296 Reputation points
2021-05-25T20:44:54.967+00:00

Hi ,I have a flat file that I am moving from one location to another. While moving from source location to destination I want to add double quotes to the header as well as rows(Enclose the column names and data values in double-quotes) while loading it to the destination. How do I do that?

Thanks in advance.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,525 questions
0 comments No comments
{count} votes

Accepted answer
  1. CzarR 296 Reputation points
    2021-05-28T21:20:25.16+00:00

    Hello @ZoeHui-MSFT , why can't we simply use just Flat file source directly connected to Flat file destination. And in the Flat file destination just change the Text qualifier to quotes.?? Why this lengthy route?

    Also, the following settings for Flatfilesource and FlatFiledestination. Please suggest. Just trying to learn. Thanks in advance.
    100569-capture.png


1 additional answer

Sort by: Most helpful
  1. ZoeHui-MSFT 35,556 Reputation points
    2021-05-26T02:16:15.33+00:00

    Hi @CzarR ,

    You may follow the steps to meet your requirement.

    1.In the flat file source connection manager, don't choose "Column names in the first data row"

    99665-screenshot-2021-05-26-100542.jpg

    2.Use Derived Column to add double quotes.

    " \" " + [Column 0] + " \" "  
    

    99619-screenshot-2021-05-26-100753.jpg

    3.In the destination file manager, choose header rows to skip for 1.

    99608-screenshot-2021-05-26-101242.jpg

    The result is like below:

    99654-screenshot-2021-05-26-101517.jpg

    If I misunderstand your needs, please incorrect me.

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    0 comments No comments