Should this code work if I only pass the StartDate, EndDate and Param1Val?

<cfparam name="Param2Val" default="null">
<cfparam name="Param3Val" default="null">

<cfinclude template="Connections/wdv.cfm">
<cfquery name="rsReport" datasource=#MM_wdv_DSN#
username=#MM_wdv_USERNAME# password=#MM_wdv_PASSWORD#>
SELECT COUNT(Clients.Client_ID) as ClientCount
FROM Clients 
WHERE 
        Client_IntakeDate >= <cfqueryparam value="#Form.StartDate#"
cfsqltype="cf_sql_date">
        AND
        Client_IntakeDate <= <cfqueryparam value="#Form.EndDate#"
cfsqltype="cf_sql_date">
        AND
        #Form.Param1# = <cfqueryparam value="#Form.Param1Val#" null="no">
        AND
        #Form.Param2# = <cfqueryparam value="#Form.Param2Val#" null="yes">
        AND
        #Form.Param3# = <cfqueryparam value="#Form.Param3Val#" null="yes">;
</cfquery>


-- 
------------------------
Donna French
[EMAIL PROTECTED]

Blog: http://dgfrench.blogspot.com
Site: http://www.dgfrenchdesigns.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=34

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183211
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to