Today I came across an interesting issue which I thought I would share the solution as it took a bit of searching to find out how to do this. It breaks down like this… I had a this query:
SELECT version_id FROM version_category_xref WHERE category_uuid IN (#arguments.lCategories#)
This didnt work at first as the list in the where clause did not have the obligatory ‘ quotes around the list items.
Rather than doing a loop through the list inserting these I thought that cold fusion must have thought of a way around this and I was right… !
By changing the WHERE clause to:
WHERE category_uuid IN (#ListQualify(arguments.lCategories,"'",",","ALL")#)
Hopefully this might help anyone out there searching for an easy way to do this like I was 10 minutes ago.
|