Hi,
I am on version 9.7.2 of db2 on LUW. I am trying to create a Foreign Key on already exisiting table to the primary key of a newly created table. The already existing table was altered to add a new column with the same definition as the primary key of the new table.
I am getting this error when I try to create the FK relationship
SQL0667N The FOREIGN KEY "CTE_FK01" cannot be created because the table
contains rows with foreign key values that cannot be found in the parent key
of the parent table. SQLSTATE=23520
Initially the Primary key was defaulted to BLANK, but I removed that option.
Please advice. The developers need it from me as urgent and I have been working on this for a while now. I cant think of anything else
Thanks
DBSAM