Chuck,

Try:

Project NewTable from OldTable Whe Limit = 0

Insert Into NewTable (quantity, col, col, col,...) +
 Sel (sum(quantity)), col, col, col... +
 from OldTable +
 group by col, col, col

Ben Petersen


On 13 Feb 2003, at 14:51, Chuck Finley wrote:

> Hopefully one of you very smart people can help me out. I imported
> data into a table that contains customer payment information. Multiple
> months of payments are included in this data. Often all rows are
> duplicates including a the quantity column. Is there an easy way to
> compare rows and when all columns are the same to tally the quantity
> and delete all rows except one and then update the quantity to the
> correct number. I have written a cmd file that accomplishes this by
> stepping through  the table with a cursor and uses a boatload of
> nested if / then statements to check is all the rows are exactly the
> same,  but this just seems real inefficient to me. I hope I am missing
> a way to compare two entire rows. Any ideas would be much appreciated.
> 

Reply via email to