Log Table

  • I need to create a log table that will log the following information.

    • File name
    • Inserted Status (Y/N)
    • Date Inserted
    • # of rows inserted
    • start time of insert
    • completed time of insert

    I have never created a log table, so i am wonder how this information is populated from when these files are loaded. anyhelp with first steps or pseudo code would be an amazing amount of help

     

    Cheers

  • How are you loading the data? Typically I'd insert a row on the start and populate the name, "n", date, 0, getdate(), null.

    Then after completion, update the row (based on filename or date or both) with the competion time, rows, etc.

  • Steve is right about how you're loading the data.  If you're using DTS to load I recommend having an execute sql task that populates the fields Steve described and after you the completion create another execute sql task to insert/update the rest of the fields.

    Good day...

    Bulent

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

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