Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I sum without duplicates
Message
 
To
17/09/2004 10:44:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00943380
Message ID:
00943391
Views:
16
Steve,
you could group the fields,
sele * from table1 group by quantity
don't forget to set engine 70/80 is you are using 8 or 9.
Slán
~M

>I have some values I'd like to sum up, but I want to skip any duplicate entries from the sum
>
>For instance a table with 2 fields, Jobnumber & quantity. Would have data like this:
>
>Jobnumber Quantity
>1 10
>1 10
>2 25
>2 25
>3 1
>4 2
>4 2
>4 2
>
>How can I sum the quantity field and come up with a total of 38.
>
>this is on a report so I cant do a no duplicates in the table.
>
>It would be really nice if I could "Calculate sum(qty) for jobnumer is unique"
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform