You didn't give much detail on your table structure. Calculating the
percentage for the entire table should look something liek
SELECT [Physical Damage]
, Count([Physical Damage])/(SELECT Count( [Physical Damage]) FROM
[YourTable]) as Percentage
FROM [YourTable]
GROUP BY [Physical Damage]
> Hi,
>
[quoted text clipped - 17 lines]
>
> C
cdolphin88@yahoo.co.uk - 04 Oct 2006 13:58 GMT
I need to calculate the percentage for each "row", not the entire
table.
Let's say that I have 3 rows, I have 1 row with physical damage value =
2 and 2 rows with physical damage value = 1.
So the percentage for physical damage value = 2 should be
CountOfPhysicalDamageValue2/ Count(PhysicalDamage) ---> 66.66%
So the percentage for physical damage value = 1 should be
CountOfPhysicalDamageValue1/ Count(PhysicalDamage) ---> 33.33%
Cheers!
C
> You didn't give much detail on your table structure. Calculating the
> percentage for the entire table should look something liek
[quoted text clipped - 26 lines]
> >
> > C