How to Find Gap from employment History?

  • I need how many days overall gap in Emp career by empID wise.

    example :

    EMPID Gap

    101 10 days

    102 250 Dyas

    Thanks,
    Shiva N
    Database Consultant

  • shiva N (5/28/2014)


    I need how many days overall gap in Emp career by empID wise.

    example :

    EMPID Gap

    101 10 days

    102 250 Dyas

    Using the same level of detail as the question (that's a hint ;-)), the first step would be to find only those employees that have more than one entry, enumerate them, and find the offset differences between the end date of the previous period and the start date of the next.

    --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.

    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 2 posts - 1 through 1 (of 1 total)

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