Skip navigation
ccsimmons
Currently Being Moderated

SELECT IN query using ormExecuteQuery()

Jan 12, 2012 4:14 PM

#orm #hql

I'm trying to do a SELECT IN query using ormExecuteQuery().  Following is the code I have:

 

Categories = ormExecuteQuery("from Category where Id IN (?)",[CategoryList]);

 

It only works when there is 1 value in the CategoryList.  i.e. This works:

 

Categories = ormExecuteQuery("from Category where Id IN (?)",[9]);

 

This DOES NOT work:

 

Categories = ormExecuteQuery("from Category where Id IN (?)",[8,9,10]);

 

Help would be greatly appreciated.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points