Pivot a list of dates into date intervals

  • Heh... I wouldn't use a sequence in Oracle for this... wrong tool... doesn't buy you much. "RowNum Over Partition" might... gotta becareful how you do it so you don't build in a performance crushing triangular join by mistake...

    Thanks for the code you posted. Are you all set now with the function I made for you or is there something else you need to finalize this problem?

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

  • My curiosity level is very high at this point.

    What I meant is that your function is just fine. I'm adapting it to handle weekends at the moment.

  • Thanks, Michael...

    Say, when you get done with your adaptation, would you mind posting it? I'm not sure what all the to-do about the weekends part of your problem is and I'd sure like to see what you come up with... thanks.

    --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 3 posts - 16 through 17 (of 17 total)

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