tags:

views:

437

answers:

5

Hi There, I have problem loading the CSV file as the connection manager editor settings are out of my knowledge. When i load the csv file up to 18 rows i have no problem it is loading in to the table. from the 19th column the data is not partioning correctly. row delimeter is {CR}{LF} column delimeter is Comma {,} how do i partion the data correctly.

any help?

+1  A: 

Here are some ideas I have with no details.

  1. What happens when you try to import the same .CSV file into Excel? Anything interesting around row 19?
  2. Does there appear to be anything different about row 19?
  3. If you delete row 19, what happens?

See, I bet you've thought of these things as well, and probably more, since you have the details. If you want anything more than superficial bad guesses, you'll have to provide a little detail.

John Saunders
A: 

I've found the CSV Import to be a bit limited with regards to bad data. If you're having trouble with the 19th column, I would suggest figuring out why that column is failing. You can try and tell the import task's error conditions to Ignore Errors with data truncation, etc...but that may not fix the issue.

I have often switched complicated or error-prone CSV imports to simply use a SSIS Script Task, then just write my own code to parse out the CSV and handle bad data.

CodeRot
A: 

If it's not partitioning correctly, it might be something as trivial as one of your field values on row 19 containing a comma, thus throwing out the import by making that row seem to have more columns. If this is the case, I hope you can get a revised version of the CSV file - this time with a text qualifier set. If possible, use something like | rather than " as the qualifier so that it's less likely to appear in the field values.

CodeByMoonlight
A: 

Put the file in a text editor such as notepad++ or textpad and change the view to show control characters. You will probably find your culprit there.

Sam
A: 

Nothing unusuale. when i paste in excel as one column and converting text to column has no problem. but i can see in the SSIS preview the field value where the problem has started has two square boxs and data of the next row. if any one want to see the file let me know i will e-mail you the file.

Hi, Kumar. You should edit your original question when you have new information. You've just added an "answer"! I suggest that you take the time to read the http://stackoverflow.com/faq.
John Saunders

related questions