Suggestions to Track Data

  • mbrady5

    SSCrazy

    Points: 2835

    Hello,

    I have a data set that contains; Employee Status, First Name, Last Name,Reports To, Hire Date

    Weekly, I will receive a list of Terminated/New Hires and Transferred Employees in the same exact Format.

    I would like to add new rows for new employees and I'd like to fill in a date in a new column for terminations and transfers.

    Ultimately, the Data will look like;

    Employee Status, First Name, Last Name,Reports To, Hire Date,Termination Date, Transfer Date

    Thanks for any ideas/suggestions.

  • JustMarie

    SSCertifiable

    Points: 7771

    This is pretty basic update/insert stuff.

    Stage the data.

    Update existing.

    Insert new.

    Rather than force it all to happen in SSIS I prefer to use a data flow to get the staging data and then an execute SQL task to run a stored procedure to do the update/insert.

  • mbrady5

    SSCrazy

    Points: 2835

    Thanks for the reply. I created what I was looking to do.

  • Jeff Moden

    SSC Guru

    Points: 995652

    mbrady5 (8/1/2016)


    Thanks for the reply. I created what I was looking to do.

    What method(s) did you use?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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