Hi Friends,
I have a problem in creating a table with a column that has two foreign Key relationship . Let me explain in detail.
Say ,I have three tables. First table A which has column A.ID(Primary Key),A.Name. Second Table B has Column B.ID(Primary Key),B.Name. Third Table C has Column C.ID ,C.Name,C.Detai l.
In C.Detail I have to store data from both table(A.ID & B.ID). So I tried to add two foreign key into the column C.Detail. During Insert Operation in Table B the following error occurs. The error Message is ViceVersa while trying to insert data into the Table A.
> "The INSERT statement conflicted with the FOREIGN KEY constraint
> "FK_C_A". The conflict occurred in database "X", table "dbo.A", column
> A.ID."
Please, Can any one help us to rectify this problem . We doesnt want to seperate columns in table C for two foreign key.
Hopefully waiting for the reply.
I have a problem in creating a table with a column that has two foreign Key relationship . Let me explain in detail.
Say ,I have three tables. First table A which has column A.ID(Primary Key),A.Name. Second Table B has Column B.ID(Primary Key),B.Name. Third Table C has Column C.ID ,C.Name,C.Detai l.
In C.Detail I have to store data from both table(A.ID & B.ID). So I tried to add two foreign key into the column C.Detail. During Insert Operation in Table B the following error occurs. The error Message is ViceVersa while trying to insert data into the Table A.
> "The INSERT statement conflicted with the FOREIGN KEY constraint
> "FK_C_A". The conflict occurred in database "X", table "dbo.A", column
> A.ID."
Please, Can any one help us to rectify this problem . We doesnt want to seperate columns in table C for two foreign key.
Hopefully waiting for the reply.
Comment