INF: Using BCP to Load Data into SQL Table with Unique Index

ID: Q69283


The information in this article applies to:


SUMMARY

BCP (bulk copy program) handles the loading of duplicate data into a table that has a unique index by stopping the processing of the data file and rolling back all records. In other words, no records are loaded into the table.

The rollback affects all rows up until the duplicate is encountered if no batchsize (-b) option was used.

In addition, if the index was created with IGNORE_DUP_KEY, the encountering of a duplicate during bcp has no effect. In other words, no rollback occurs and the bcp will continue.

Additional query words:


Keywords          : kbtool SSrvBCP 
Version           : winnt:4.2x,6.0,6.5,7.0
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: May 4, 1999