![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I work in DTS Package and this DTS insert fileds from TXT file into any table. I need control with ON ERROR RESUME NEXT the error "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object <table">. Because i can't. Somebody help me plissss! Thank's LML |
#3
| |||
| |||
|
|
Hello Luis, A PK Violation will abort the batch. I had a small amount of success here. Multiphase Data Pump (Field Notes) (http://www.sqldts.com/default.aspx?282) A much cleaner solution would be to import your file to a staging table and then use TSQL to compare key values. You can then only insert rows with key values not already in the destination. Allan I work in DTS Package and this DTS insert fileds from TXT file into any table. I need control with ON ERROR RESUME NEXT the error "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object <table">. Because i can't. Somebody help me plissss! Thank's LML |
![]() |
| Thread Tools | |
| Display Modes | |
| |