• raghuldrag (7/27/2012)


    account PR_Mons credit debit closinbal

    =======================================

    E2674 apr 3000 00000 -3000

    R7890 jun 0000 50000 5000

    E9700 feb 5000 0000 5000

    E2674 apr 3000 00000 -3000 ======>expextingh output

    R7890 jun 0000 50000 5000

    E9700 feb 5000 0000 5000

    condition:

    **while account "E" means=cr-dr inclosing bal

    as the same account "R" means=dr-cr inclosing bal

    how to make query friend..... suppose I m giving from one month to another month it display the month in ouput of account......

    The sample data you provided and the expected output don't match

    You have given 5 rows in the sample data and are expecting 6 rows in the output

    Even the amounts are not matching either

    Can you explain the logic a bit more for your expected result?


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/