|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
"Running Total" query
Hi, I've been sctratching my head for weeks now and can't get my thoughts around it. My problem is that I have an inbox of items which when processed goes through the outbox. Anything that doesn't get sent out should be cumilatively "added" to the following week's inbox. I have to create a report of items in or items in the "in" queue and item out for each week.
Each item in has a time stamp, but this does not get updated, I can only read the original date the item was added to the in queue. Does this make sense? Any thoughts? I'm sure it can be done, but the great google has not spoken to me. Thanks in advance |
|
#2
|
||||
|
||||
|
every week has a separate inbox table??? you need to rethink your design
|
|
#3
|
|||
|
|||
|
Quote:
Sorry if I've confused you Let me see if I can draw this out. The db table typically looks like GoodsItem, inWk, outWk aa, 1, 1 bb, 1, 4 cc, 1, 2 dd, 2, 3 ee, 2, 2 ff, 2, 4 So the report should look like wk, new, toProcess, processed 1, 3, 3, 1 2, 3, 5, 2 3, 0, 3, 1 4, 0, 2, 2 So each week, in addition to the new items, the toProcess queue also has items not processed the week before. I don't know how to keep track of items not processed in a week and add them to the count of the following weeks. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > "Running Total" query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|