• david.foli7 (8/28/2016)


    Yes Sue, the error occurs deleting from the fuel_message table

    Okay. I think I explained the relationship, why you get the error and how you would end up with orphaned records.

    So you need to not delete records in the fuel_message table if they have the related records in FUEL_ESS_PUBLISH_RECORD. Or you need to delete the records in FUEL_ESS_PUBLISH_RECORD prior to deleting them in the fuel_message table. You have to delete the children before deleting the parent or don't delete the parent records that have children records.

    Cascading deletes would delete the child records when a parent record is deleted but if you don't know what's going on when you delete a record, that just seems to be a disaster in the making.

    You need to understand the data model, the relationship between the tables and understand the business requirements for this process to know what you need to do to address it.

    Sue