Conflict between tables in sql servre 2012

Asked

Viewed 266 times

0

I have a problem making a relationship between two tables in sql server 2012. How can I resolve this?

Table 'tbl_chkrecebimento' saves successfully Table 'tbl_chkitens' - Cannot create relation 'Fk_tbl_chkitens_tbl_chkrecebimento'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "Fk_tbl_chkitens_tbl_chkrecebimento". The conflict occurred in the database "USUARIOS", table "dbo.tbl_chkrecebimento", column 'ID_CKL'.

follows the image inserir a descrição da imagem aqui

  • 1

    What fields are calling on the key?

  • You’re right I’m not doing wrong, how can I make the relationship right ?

  • 1

    How do you want to make the relationship? what is the reference?

  • 1

    You must indicate the function of the tables to determine their relation (one to one, one to many, etc...) then you must indicate the type of columns you want to use for this relationship

  • Reference and field ID_CHKLIST

  • The chkrecebimento table and the header, and the chkitens table are the items referring to chkrecebimento table.

  • then the chkrecebimento table and one and the chkitens table are several items,

  • Good morning. I’ve adjusted my tables now I’m already managing to make relationships. Thank you

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.