I'm getting an error while running a stored procedure and don't quite know the solution to the problem.
What I am trying to do is determine whether an identity column is in a varchar list of integer IDs. The code compiles fine in my stored procedure but while trying to run it from a CF script I get a syntax error (see below). The code works if there is only one element in the comma-seperated list but throws the error if there are more than one. I've already tried using CONVERT on both ID_Product and homeHotProd in the WHERE statement but doing it on ID_Product gives an empty result set and homeHotProd returns an error. ERROR MESSAGE: Syntax error converting the varchar value '47,9' to a column of data type int. SQL SYNTAX SELECT ID_Product FROM Product,Homepage WHERE ID_Product IN (homeHotProd) ID_Product is an integer homeHotProd is a varchar comma-seperated list of integers Does anyone have the fix to this problem?? Thanks in advance for the help. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
