Reputation: 423
I am trying to load data in my csv into SqL datatable using SSIS. One of the column headers contain Comma (,) in it. E.g. "ABC 100, Price +10%" . I know the solution for handling comma's in data values using " as the text qualifier. But can anyone help me with this?
Upvotes: 0
Views: 1623
Reputation: 874
From the looks of the error you are getting it seems like there is more than 1 column in your spreadsheet that either doesn't have a name, or columns are being picked up from the end of your spreadsheet.
-Open up your Flat File Connection Manager and click on 'Columns'.
-Click 'Reset Columns'
-Scroll through the columns and see if there are columns that don't have a name.
-If there are columns that don't have a name and don't have any data because they were added on at the end of the original columns, go to 'Advanced', find the columns, and delete them.
-If there are columns that don't have a name but do have data in them, go to 'Advanced', find the column, and add a name to them.
Will probably need to re-add your 'Flat File Source' Data Flow task to reconnect to the Flat File Connection after you re-name and/or delete the columns.
Upvotes: 0
Reputation: 1883
Look up the HEX value of the comma, what may appear as a comma could indeed be something similar to it. Look up the hex value and compare it to a comma's hex value, and that should be different.
There is no separate support for headers, they are the same as row values. Open your CSV in textpad and see if it is wrapped in commas.
Upvotes: 1