• consumable data for the next poster:

    With [MY DATE](ITEM_NAME , CODE , [DATE] , OB_QTY , RECD_QTY , ISSUE_QTY, BALANCE_QTY)

    AS

    (

    SELECT '5 PR CABLE','05','01/04/10','25','0','0','25' UNION ALL

    SELECT '5 PR CABLE','05','02/04/10','0','2','0','2' UNION ALL

    SELECT '5 PR CABLE','05','03/04/10','0','0','2','-2' UNION ALL

    SELECT '10 PR CABLE','06','01/04/10','20','0','0','20' UNION ALL

    SELECT '10 PR CABLE','06','02/04/10','0','0','5','-05'

    )

    SELECT * FROM [MY DATE]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!