• gbarger
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi guys,

 

Here is my situation, I want to query multi-select picklists in static soql, I have done this in dynamic soql, but in static soql, I don't know how to do it?

 

code snippet:

 

String categories = 'Featured, Super Featured';List<Product2> products = [select Category__c from Product2 where Category__c includes (:categories)];

 

In this way, I want to select all the products include Featured or Super Featured category, but I cannot get the right records.

 

But in this way, I got the right records.

 

List<Product2> products = [select Category__c from Product2 where Category__c includes ('Featured','Super Featured')];

Is there anyone can help me this problem? Thanks in advance!!

 

Thanks

 

Message Edited by Eriksson on 03-02-2010 12:50 AM
Message Edited by Eriksson on 03-02-2010 05:03 PM
Message Edited by Eriksson on 03-02-2010 05:04 PM