reference table for errors

  • Hello everyone

    I have on each table of my base two columns used to store my anomalies Functional [error_id] and [description_error]

    create table produit
    (
    id int ,
    nom varchar(50),
    id_erreur int ,
    description_erreur varchar(50),
    )

     

    create table magazin
    (
    id int ,
    nom varchar(50),
    id_erreur int ,
    description_erreur varchar(50),
    )

    I would like to store all my errors with their descriptions with the name of the source table in a single reference table by going through all the error_id the table reference error is the following

    create table list_erreur
    (nom_table varchar(50),
    id_erreur int ,
    descritption varchar(50)
    )

    Who has an idea please

    Thank you for your return

    1. Check how you've spelt "description" in your list_erreur table
    2. Remove the description_erreur column from the rest of your tables
    3. Create a foreign key constraint between the id_erreur column in each of the rest of your tables and the id_erreur column in your new table
    4. Change your application logic so that it no longer provides a value for the description column

    John

  • Instead of providing us with a list of requirements and forcing us to play "guess the question", why not ask us something specific?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

    • Is the errors from database procedures/functions or from outside the database?
    • Do you use a stored procedure to save the error?
    • Do you not need a timestamp of the error?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply