• Shall we understand that...

    1- Your system is cumulative loading of a particular table.

    2- Each day you get new rows that have to be inserted.

    3- Each day you get updates to some columns of existing rows.

    Is that correct?

    If the answer is yes then your system should look like this:

    SourceDocuments ==> StatingTable ==> CoreTable

    SourceDocuments represent the files you have to load.

    StatingTable has to be truncated before each "load" and should include ALL columns you want to capture from the SourceDocuments.

    CoreTable represents the place you want to keep data up-to-date. As already posted you have to figure out a way to identify each row uniquely (PK) then your load process has to either INSERT or UPDATE rows depending on existance of the row or not on CoreTable.

    Hope this helps.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.