>I would split it in two selects. The first calculates woHours and totalHours and the second uses calculated values.
Like this. Cool. Thanks Sergey
Select sum(ts.nHours) as totalHours, ;
Sum(IIF(ts.fk_timetype_id = 1, 1, 0)) As woHours, ;
from timeSheest ts
into cursor rsHours
Select *, ;
(woHours / totalHours) * 100 as woRatio ;
from rsHours
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!