Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Scott Warris
  Where is Scott Warris?
 Lima
 Ohio - United States
 Scott Warris
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: Total Like Items in a table
Thread ID: 289167 Message ID: 289215 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, December 29, 2010 3:28:59 PM         
   


> > Hello, I've got a table that contains 1000's of records and I need to combine the like records and total the QTY field of the like items.
> >
> > My table contains the following fields ItemNum, Desc, Qty and Qtytotal
> >
> > I've thought about just appling an index with the unique command to filter out the like items but I need to store the sum Qty field to the Qtytotal field and I can't see how to do this.
> >
> > Thanks for your help..Scott
>
> Do you mean the accumulated total of qty values for each itemnum in itemnum order?
>
>
itemnum qty qtytotal
> 1 10 10
> 2 5 15

> and so on
>
> -Anders

I need to group the like item numbers and then total the Qty field and store it to the qtytotal, then do an index with the unique command or something to show each item only once with the total.. I hope that helps clear this up..

itemnum  qty qtytotal
> 11111 10 10
> 22222 5 5
> 11111 2 11


Thanks again..

ENTIRE THREAD

Total Like Items in a table Posted by Scott Warris @ 12/28/2010 9:50:51 PM
RE: Total Like Items in a table Posted by Anders Altberg @ 12/28/2010 10:05:28 PM
RE: Total Like Items in a table Posted by Scott Warris @ 12/29/2010 3:28:59 PM
RE: Total Like Items in a table Posted by Anders Altberg @ 12/29/2010 5:04:13 PM
RE: Total Like Items in a table Posted by Tariq mehmood @ 12/29/2010 6:31:00 AM
RE: Total Like Items in a table Posted by Jun Tangunan @ 12/29/2010 7:14:22 AM
RE: Total Like Items in a table Posted by Scott Warris @ 12/29/2010 5:15:48 PM