March 3, 2009 at 5:37 am
I am creating a package through SSIS. when I try to import the csv file in sql table by using the DataFlow-->Flat File Source-->OLE DB Destination, it is working fine for this format.
2,raj,delhi,4,4
1,sudhir,d,3,4
but when the csv format like this
2,raj,delhi,4,4
3,2
2,raj,delhi,4,4
it throws an error message, due to second row is incomplete.
So the question is how we can eliminate the row which not contains the complete column.
Any Ideas?
March 3, 2009 at 5:55 am
This is a good question...someone probably has an answer but I don't. If I may, I'd respond with a comment. First, I've never seen one like this, stoked that I don't have a file that's in that bad of shape 😀 Second, without all of the delimiters, how do you tell which column goes where?
Example:
Your data
2,raj,delhi,4,4
3,2
2,raj,delhi,4,4
So for this row (PK violation notwithstanding)
2,raj,delhi,4,4
suppose you get this?
2,4
How can you tell whether the first "4" is for the fourth attribute or the fifth?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply