You need to sign in to do that
Don't have an account?
Shashi Salesforce
Case sensitive LIKE in SOQL
Hi,
Is there any way to make LIKE operator work in a case sensitive way in SOQL? Please help.
Thanks,
Shashi
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi,
Is there any way to make LIKE operator work in a case sensitive way in SOQL? Please help.
Thanks,
Shashi
Hi Shashi,
The LIKE operator performs a case-insensitive match, unlike the case-sensitive matching in SQL. So if you want to get results according to the case sensitivity then you first have to fetch the records with LIKE operator in list and than addition check over the list to get case sensitive records.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
As per requirement, you initially need to convert the values to the upper/lower case and then use that in the Query.
Set<String> list_of_email_ids_lc = new Set<String>();
for(String emailId : list_of_email_ids){ list_of_email_ids_lc.add(emailId.toLowerCase()); } List<Custom_Object> objects = [SELECT Id, Custom_Email_Id from Custom_Object where Custom_Email_Id IN :list_of_email_ids_lc];