![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am importing data from one database to another using DTS. During the importation process, I get the following error message: INSERT statement conflicted with COLUMN FOREIGH KEY constraint. "FK_foot_Gen". The conflict occurred in database 'Sales', table 'Gen', column 'ID' There are 50 tables in the database and seven returned similar message. How can I determine which records are causing the conflicts and how do I prevent this from happening again? Thanks |
#3
| |||
| |||
|
|
OK If you know the data is clean then you can drop the relationships between the tables during load and then reapply afterwards. You could also try to order the import process through precendence constraints to the correct order for your tables. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Emma" <Emma (AT) discussions (DOT) microsoft.com> wrote in message news:243CFD14-5897-4481-AB38-5AA684703FEF (AT) microsoft (DOT) com... I am importing data from one database to another using DTS. During the importation process, I get the following error message: INSERT statement conflicted with COLUMN FOREIGH KEY constraint. "FK_foot_Gen". The conflict occurred in database 'Sales', table 'Gen', column 'ID' There are 50 tables in the database and seven returned similar message. How can I determine which records are causing the conflicts and how do I prevent this from happening again? Thanks |
#4
| |||
| |||
|
|
Thanks for your response. I do not know if the data is clean. It is very possible that it is not. What is precendence constraints? "Allan Mitchell" wrote: OK If you know the data is clean then you can drop the relationships between the tables during load and then reapply afterwards. You could also try to order the import process through precendence constraints to the correct order for your tables. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Emma" <Emma (AT) discussions (DOT) microsoft.com> wrote in message news:243CFD14-5897-4481-AB38-5AA684703FEF (AT) microsoft (DOT) com... I am importing data from one database to another using DTS. During the importation process, I get the following error message: INSERT statement conflicted with COLUMN FOREIGH KEY constraint. "FK_foot_Gen". The conflict occurred in database 'Sales', table 'Gen', column 'ID' There are 50 tables in the database and seven returned similar message. How can I determine which records are causing the conflicts and how do I prevent this from happening again? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |