Jochem van Dieten wrote:
> 
> SELECT
>       Agency_No,
>       Fund_No,
>       count(1) as totalRecs,
>       (
>               SELECT  COUNT(1)
>               FROM    sco567_568 b
>               WHERE   Completed = 1
>                       AND a.AGENCY_NO = a.AGENCY_NO
                                          ^^^
                                           b

>                       AND a.Fund_No = b.Fund_No
>       ) AS totCompleted
> FROM
>       SCO567_568 a
> WHERE
>       Agency_No = <cfqueryparam ...>
> GROUP BY
>       Agency_No,
>       Fund_No

Jochem

PS Use a fixed width font for the right effect.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to