Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


INVENTORY ONE TABLE CREATE HOW TO BALANCE QTY CARRY IN NEXT ROW


INVENTORY ONE TABLE CREATE HOW TO BALANCE QTY CARRY IN NEXT ROW

Poll
PLEASE HELL ME SOLVE MY PROBLEM

0% - 0 votes UPDATE MY_TABLE
0% 0 votes
0% - 0 votes
0% 0 votes
0% - 0 votes SET BALANCE_QTY=OB_QTY+RECD_QTY-ISSUE_QTY
0% 0 votes
0% - 0 votes
0% 0 votes
Member votes: 0, Guest votes: 0. You don't have permission to vote in this poll
Author
Message
vpatil_vsp
vpatil_vsp
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 37
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

 

 
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14932 Visits: 38923
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!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search