April 17, 2002 at 12:03 pm
I'm running a BCP IN to a table that has a unique index with ignore duplicate key. I'm getting the error 'Duplicate Key was ignored', but my bcp is failing. I'm importing about 6.8 million recs and I've set my maxerror switch to 7 million. Can anyone tell me how I can make the bcp ignore the dup. key error and continue running?
Thanks,
Jeff Matthews
Jeff Matthews
April 17, 2002 at 3:13 pm
I could be wrong... but I beleive the ignore dupe key is best used with T-SQL's Insert. Not BCP. I am not sure if it will work with Builk Insert.
-JG
-JG
April 17, 2002 at 3:25 pm
Sorry BCP has a maximum of 65000 something ignores then no matter what your setting is it stops ignoring. You could break into batches with firstrow lastrow options. But the way you are doing this you might just want to setup an import table (with no need for uniques) and do a distinct into the destination table then truncate the import table.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply