1

I'm using Data Loader to extract some data and I'm running into an issue. I have a bunch of values that I want to run a LIKE query against, but I basically want to do a like with and IN clause. So my code is:

SELECT ID, PREF from CONTACT WHERE PREF=BBB% OR PREF=JJJ%)

The catch seems to be, this works just find on regular text fields, but the data I'm querying is a multi-pick list so I'm getting the old 'cannot bind' error. I'm new to SOQL and a little out of my depth especially using data loader, so I appreciate any help.

Thanks!

1
  • Since you commented that you're having problems using the data loader, make sure you read the Salesforce Object Query Language (SOQL) documentation. It has everything you need to know.
    – sfdcfox
    Commented Apr 5, 2018 at 0:47

1 Answer 1

2

LIKE operator is not supported in Multi-select picklist.

You need to use INCLUDES keyword to compare and listing

WHERE MultiSelectField__c includes ('BBB') OR MultiSelectField__c includes ('JJJ')

Refer Querying Multi-Select Picklists

Secondly, if multi-select picklist entry is Billing then you need to specify MultiSelectField__c includes ('Billing') as MultiSelectField__c includes ('Billin%') doesn't return matching the records.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .