Clear all

[Solved] The DELETE statement conflicted with the REFERENCE constraint  


Joined: 9 months ago
Posts: 1
Topic starter  

When I try to load the data mart, i get the error message:

Error: 0x0 at Execute SQL Task: The DELETE statement conflicted with the REFERENCE constraint "FK_Monthly_Sales_Store". The conflict occurred in database "S20S308_DATAMART", table "dbo.F_Monthly_Sales", column 'ID_Store'.
Task failed: Execute SQL Task

Joined: 5 years ago
Posts: 8


You try to delete a table where a foreign key constraint exists. That means, another table contains data the references to the table you want to delete.

This is a common problem for beginners who want to delete a star schema. The fact table references to the dimension table. If you want to delete a dimension table where data in the fact table exits, you will get that error message. 


Please read the error message, to see which table causes the problem in your DELETE statements.




Leave a reply

Author Name

Author Email

Title *

Maximum allowed file size is 10MB

Preview 0 Revisions Saved