Using Excel to create a CSV file with special characters and then Importing it into a db using SSIS

前端 未结 2 1077
我寻月下人不归
我寻月下人不归 2021-01-26 08:16

Take this XLS file

\"enter

I then save this XLS file as CSV and then open it up w

相关标签:
2条回答
  • 2021-01-26 08:43

    Conclusion:

    Just like the error message says in your update...

    The flat file parser does not support embedding text qualifiers in data. Parsing columns that contain data with text qualifiers will fail at run time.
    

    Confirmed bug in Microsoft Connect. I encourage everyone reading this to click on this aforementioned link and place your vote to have them fix this stinker. This is in the top 10 of the most egregious bugs I have encountered.

    0 讨论(0)
  • 2021-01-26 08:57

    Do you need to use a comma delimiter.

    I used a pipe delimiter with no Text qualifier and it worked fine. Here is my output form the text file.

    1|ABC|AB"C|D,E|F|03|3,2

    You have 3 options in my opinion.

    1. Read the data into a stage table.
    2. Run any update queries you need on the columns
    3. Now select your data from the stage table and output it to a flat file.

    OR

    1. Use pipes are you delimiters.

    OR

    1. Do all of this in a C# application and build it in code.
    2. You could send the row to a script in SSIS and parse and build the file you want there as well.

    Using text qualifiers and "character" delimited fields is problematic for sure.

    Have Fun!

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