I am running a query then taking the results of the query and storing
them in a list using the quotedValueList() function. I am then doing
another query to see if any of the values in the list match any values
in the database using the following:

SELECT Distinct subcategory_name
FROM subcategories
WHERE subcategory_code in (#codeList#)

If I output codeList it looks like :
'UPWW','UPCO','CART','SLUG','LTAG'  which is how the values should look.

However, when I run this, CF is throwing an "Incorrect Syntax error"
and the values are displaying like this in the error message:
SELECT Distinct subcategory_name
FROM subcategories
WHERE subcategory_code in (''UPWW'',''UPCO'',''CART'',''SLUG'',''LTAG'')

Why would CF be adding double quotes in the list? This is what is
causing the error, if I run the query in Query Ananlyzer with single
quotes it works fine.

Has anyone run into something like this before? Even if I take the
query and add single quotes around each value in the query itself and
just use valueList() it gives me the same error.

Thanks,
Ben
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to