SSIS - export CSV delimiter problem

nononame2021 256 Reputation points
2022-06-21T07:40:14.643+00:00

my address column contain double quotes and commas like this <"return" Flat 111,Rd333, US> and stored in SQL server table. when i set delimter to commas , once i export the column to csv, it will slipt it into 3 columns

when i set the delimter to double quote, the double quote in the column will disappear.

how to fix my issue to handle the double quote and commas problem for the address column.

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

3 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 39,591 Reputation points
    2022-06-21T08:08:38.313+00:00

    Hi @nononame2021 .

    Do not forget to click "Accept Answer" if the answer could resolve your issue.

    Add the Derived Column component with below expression.

    "\"" + [yourcolumnname] + "\""  
    

    213286-image.png

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


  2. nononame2021 256 Reputation points
    2022-06-21T08:27:32.877+00:00

    my database value is : "RETURNED MAIL" ,GG No. 8

    it become the following when i add derived column to "\"+ column_name + "\" and set text delimiter in csv connection manager to " (double quote), am i correct?
    "RETURNED MAIL ,GG No. 8""

    some double quote will be deleted and some double quote are added. not same as my data in database. how to fix it?


  3. nononame2021 256 Reputation points
    2022-06-21T08:46:33.717+00:00

    when i export to csv , how can i keep the actual data to export to column, my data contain double quote and commas

    "RETURNED MAIL" ,GG No. 8

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.