Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SSIS + Flat File Source + ignore invalid rows + CS

Author  Topic 

sudhirbharti
Starting Member

16 Posts

Posted - 2009-03-03 : 07:38:13
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?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-03 : 09:36:07
you need to do it by means of conditional split task. check for second column value and if its not expected one redirect those rows to error log table or flat file. only transfer the other rows to destination

http://msdn.microsoft.com/en-us/library/ms137886.aspx
Go to Top of Page
   

- Advertisement -