Is it possible to pass a single quoted list into a SQL server stored
procedure for use in an "IN" statement:
see the following code...
***************
PROCEDURE
***************
CREATE PROCEDURE spMEPFundList
@mepid varchar(3),
@CustList varchar(400),
@StandList varchar(400)
AS
Select tFund_name, tTicker, Cust=0
from tblFunds
where tTicker in (@StandList)
UNION
Select tFund_Name, tTicker, Cust=1
from tblCustomFunds
where tTicker in (@CustList)
and txtMEP = @mepid
****************
CF CODE
****************
<cfset CustList = "'AFAF', 'AGAX'">
<cfstoredproc procedure="insertUser" ...>
<cfprocparam ....
<cfprocparam type="IN" cfsqltype="CF_SQL_VARCHAR"
dbvarname="@CustList" value="#PreserveSingleQuotes(request.CustList)#"
null="no">
<cfprocparam ....
</cfstoredproc>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists