I'm trying to convert this cold fusion query to stored procedure but can't
get the correct syntax due to the dynamic where clause.
Any help would be really cool.
<CFQUERY NAME="qResultsOfS" DATASOURCE="HTCYP" BLOCKFACTOR="100">
SELECT CustomerID,Telephone,AreaCode,BusinessName,Address,
City,State,ItemCode,Website,Ad
FROM CustomerInformation
WHERE 0=0
<CFIF IsDefined("FORM.COpt") AND FORM.COpt is not "--">
AND City = '#FORM.COpt#'
</CFIF>
<CFIF IsDefined("FORM.CTB") AND FORM.CTB is not "--">
AND Classification = '#FORM.CTB#'
</CFIF>
AND #FORM.SOpt# like '%#FORM.SK#%'
ORDER BY Classification, #FORM.SOpt#
</CFQUERY>
Thanks,
Dave
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists