LIKE operator in SOQL against set of strings

Sample Code:

Set < String > filterOptions = new Set < String > {'Test%', 'Sample%', '%Temp%'}
List < Accont > listAccts = [ SELECT Id FROM Account WHERE Name LIKE : filterOptions ];

Cheers!!!

No comments:

Post a Comment