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
 General SQL Server Forums
 New to SQL Server Programming
 BCP

Author  Topic 

jnjarun
Starting Member

1 Post

Posted - 2011-08-30 : 23:18:11
I am using BCP command to import data from a file to SQL server table. It is importing. But invalid rows are not imported. As file size is big, it is not so easy to check line by line. Is there any way to extract rows that are not imported using BCP while copying
i.e. skipped rows. Note : -e switch did not help me.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-31 : 00:23:46
i think for getting failed rows it might be worth using ssis package so that you can use conditional task to get bad rows redirected to error file

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-09-05 : 05:51:40
This may help you
http://beyondrelational.com/blogs/madhivanan/archive/2009/10/19/finding-out-problematic-data-in-bulk-insert-data-truncation-error.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -