• gcresse (4/20/2013)


    Perfect! That's exactly the answer I was looking for. I tried all sorts of SUM OVER PARTITION BY combinations with no luck, but I see the PARTITION wasn't required. I guess I was over-thinking it.

    Thank you so much, JLS. If ever you want a really good bottle of wine, just let me know 😀

    Gina

    Thanks Gina....would suggest that you examine exec plans for larger data sets and index where applicable.

    good luck and thanks for the offer (Châteauneuf-du-Pape 1998_<grin>)

    edit ...for multiple PudId use partition by

    eg

    OVER ( PARTITION BY PUDID ORDER BY PudID , TranDate )

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day