Notifications
Clear all

[Solved] The DELETE statement conflicted with the REFERENCE constraint  

 

Joined: 6 months ago
Posts: 1
22/07/2020 9:42 am  

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


Quote
Joined: 5 years ago
Posts: 8
22/07/2020 9:46 am  

Problem:

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.

 

 


ReplyQuote

Leave a reply

Author Name

Author Email

Title *

Maximum allowed file size is 10MB

Preview 0 Revisions Saved
Share: