Skip to main content
Inspiring
March 7, 2012
Answered

Using a created list in a SQL IN query

  • March 7, 2012
  • 1 reply
  • 1016 views

I've solved this before but can't remember how, know it's going to be a simple one

I've created a list from a CFLOOP, let's say it's MYLIST="us,ca,au,fr"

I need to run a SQL CFQUERY on this list, WHERE xyz IN (MYLIST)

The problem is that it won't read it correctly. Can anybody tell me the right command to make the sql read the list correctly on an individual item basis

Thanks

Mark

This topic has been closed for replies.
Correct answer Dan_Bracuk

cfqueryparam list="yes"

1 reply

Dan_BracukCorrect answer
Inspiring
March 11, 2012

cfqueryparam list="yes"

ACS LLCAuthor
Inspiring
March 14, 2012

Ahhh. I remember using that before now that you mention it

Once again, thanks Dan

Mark