February 22, 2011 at 12:42 pm
MY DATE
ITEM_NAME , CODE , DATE , OB_QTY , RECD_QTY , ISSUE_QTY BALANCE_QTY
5 PR CABLE 05 01/04/10 25 0 0 25
5 PR CABLE 05 02/04/10 0 2 0 2
5 PR CABLE 05 03/04/10 0 0 2 -2
10 PR CABLE 06 01/04/10 20 0 0 20
10 PR CABLE 06 02/04/10 0 0 5 -05
I WANT RESULT
ITEM_NAME , CODE , DATE , OB_QTY , RECD_QTY , ISSUE_QTY BALANCE_QTY
5 PR CABLE 05 01/04/10 25 0 0 25
5 PR CABLE 05 02/04/10 0 2 0 27
5 PR CABLE 05 03/04/10 0 0 2 25
10 PR CABLE 06 01/04/10 20 0 0 20
10 PR CABLE 06 02/04/10 0 0 5 15
PLEASE HELL ME
February 22, 2011 at 12:55 pm
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
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy