|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Anybody please help me create a query that would return this expected output. Any help would be very much appreciated. I was able to do the Totalized Per PO already, but having hard time creating the Totalized PerBox.
Thank you very much! Date QTY Box Number Box Code PONumber Totalized PerBox Totalized Per PO 1/1/04 10 1 A 01 10 10 1/2/04 15 2 A 01 25 25 1/3/04 20 3 A 01 45 45 1/4/04 10 1 B 01 10 55 1/5/04 20 2 B 01 30 75 1/6/04 15 3 B 01 45 90 Please bear with me, the expected output I pasted doest seem to show as it should be, It removed the spaces within values. |
|
#2
|
|||
|
|||
|
Which DB are you trying to do this in.
If you have MS Access you can fo to there knowledge base and dowloard a sample query DB called QrySmp00.exe It has several sample querys (SQL is fairly standard) that show you have running totals, all you would have to add is the ability to distingiush between POs and boxes (which won't be to hard). S- |
|
#3
|
|||
|
|||
|
Thanks so much for the Reply. Yes I was able to download the sample query in Access. There were many sample queries, but none of the examples shows what I want to do.
I want to have a running total that would "reset" when my keyField changes. Example: Date QTY Box Number Box Code PONumber Totalized PerBox Totalized Per PO 1/1/04 10 -----1 --------A------- 01 ----------10 -------------10 1/2/04 15 -----2 --------A -------01 ----------25 -------------25 1/3/04 20 -----3 --------A -------01 ----------45 -------------45 1/4/04 10 -----1 --------B -------01 ----------10 -------------55 1/5/04 20 -----2 --------B -------01 ----------30 -------------75 1/6/04 15 -----3 --------B -------01 ----------45 -------------90 Note: For the whole PO the Totalized per PO would continue to do running Total; while the Totalized per box would reset count on the New Box Code. Thanks again for your help. |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Resetting Running Total |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|