I am trying to figure out the best way to do multiple LIKE
matches in a complicated soql statement.
I want to change the hubFilter
value from just "BCS%"
to "BCS%,Benefit Advisor,Mgr of Ben,BSR"
.
I tried this and got nothing back so I assume it's not reading those as separate values. Any ideas?
Here is a basic example of what my query looks like:
list<BCS__c>hubs = new list<BCS__c>();
private string hubfilter;
if(showAll == TRUE){
hubFilter = '%';
}else{
hubFilter = 'BCS%';
}
hubs = [
SELECT /*fields and subqueries*/ FROM BCS__c
WHERE /*other clauses*/ AND Title__c LIKE :hubFilter
];