http://www.4guysfromrolla.com/webtech/031004-1.shtml

-----Original Message-----
From: Ali Awan [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 3:17 PM
To: CF-Talk
Subject: Re: Converting a Query to Stored Procedure

Thanks to everyone who posted suggestions.
Qasim, the article showed several examples using an integer list.
I am looking for an example using a character list.

I ended up searching some SQL sites and came up with something on my own.
Using preservesinglequotes in ColdFusion, did not help, it actually caused
errors.  Apparently when you have a list of character values, with single
quotes, instead of treating it as a list, SQL treated each element as a
separate parameter.

Patti, the example you showed closely resembles the solution I came up with.

On the coldfusion end, I ended up passing 2 regular coldfusion lists, as
varchars to the stored procedure.  Then in the SQL Stored procedure, I parse
each list, looping through and inserting ' around each element, and then
creating a temp table for each list.  The final query joins on the temp
tables.

Thanks to everyone again,
Ali



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235733
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to