Hi,@AVELIU
The conflict occurred in database "NeptunDWBI", table "dbo.d_docType", column 'id'."
The problem occurs when you are trying to insert a record with a value in the foreign key column that doesn't exist in the parent table.
Run sp_help 'dbo.Sup_Item_Cat'
. See which column that foreign key is on, and which column of which table it references.
To solve thie issue ,you may Insert Data into the parent table(d_docType) containing the Primary Key before attempting to insert data into the child table(f_sales) containing the Foreign Key.
If SQL Server 2016 (13.x) and later, have a look on this document: Disable Foreign Key Constraints with INSERT and UPDATE Statements
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.