That's the one. Outstanding - thank you very much sir.

Thanks,
Ferg
 
 

-----Original Message-----
From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 03, 2006 1:09 PM
To: CF-Talk
Subject: Re: Qry help...

Ken Ferguson wrote:
>  
> So, I'd like to see:
> John - 40% - 5 incidents
> Sue - 50% - 4 incidents
>  

Try something like this...

SELECT p.personName,(SUM(CASE t.tool WHEN '-5' THEN 100 ELSE 0 
END)/count(t.tool)) as notoolpercent
FROM People p INNER JOIN ToolsUsed t ON p.IncID = t.IncID
GROUP BY p.personname



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262672
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to