Comma within fields in CSV file -import to DB using SSIS

前端 未结 3 1152
自闭症患者
自闭症患者 2021-01-11 21:44

I have a CSV file - It has many values having comma as a part of value.The commas within the fields will mislead my SSIS package

相关标签:
3条回答
  • 2021-01-11 22:00

    You will need to ensure that all values in the file that have commas as part of the text are enclosed in double quotes ("). Then you can set the text qualifier in your flat file source, and the commas will be loaded as part of the string fields.

    0 讨论(0)
  • 2021-01-11 22:02

    I feel that a better way of doing this is by using a Derived column Transformation Editor in SSIS Data Flow, and changing the expression to surround the string with double quotes.

    For instance if the column "Address" has records with commas, then create an expression such as

    "\""+Address+"\""

    in the Derived Column Transformation Editor.

    I think this is a good option if you are not willing to transform the source.

    0 讨论(0)
  • 2021-01-11 22:08

    Use Text Qualifier in Flat file Connection Manager as ". This will separate only values out of quotes by commas. Your data from db will be enclosed in quotes.

    0 讨论(0)
提交回复
热议问题