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

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 .