Hello all,
I'm having an issue when it comes to inserting a record into a table that has a foreign key link.
This is the error I'm getting: The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_EX8_MATERIALTESTREPORTDETAIL_OSUSR_EX8_MATERIALTESTREPORT_MATERIALTESTREPORTID". The conflict occurred in database "OSDEV1", table "dbo.OSUSR_EX8_MATERIALTESTREPORT", column 'ID'. The statement has been terminated.
Below is a data model of the data I'm working with. The goal of this web app is to take records from an old ERP database and convert them into this one that has a different structure and different column names.
The insert into the "MaterialTestReport" table works flawlessly, it's the detail table insert that doesn't work.
Any help is appreciated, I can't figure out why it's tripping up on the foreign key. Everything on my end (like the actual data) seems to be correct and should work together with no problems.
Thanks!