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'.
What fields are calling on the key?
– João Martins
You’re right I’m not doing wrong, how can I make the relationship right ?
– Junior Guerreiro
How do you want to make the relationship? what is the reference?
– Paulo Alexandre
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
– Jorge Costa
Reference and field ID_CHKLIST
– Junior Guerreiro
The chkrecebimento table and the header, and the chkitens table are the items referring to chkrecebimento table.
– Junior Guerreiro
then the chkrecebimento table and one and the chkitens table are several items,
– Junior Guerreiro
Good morning. I’ve adjusted my tables now I’m already managing to make relationships. Thank you
– Junior Guerreiro