function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dipu2dipu2 

Cannot figure out what is wrong in this SOQL WHERE clause combining NOT LIKE with another clause?

[SELECT Id, Name, AccountId FROM Contact WHERE NOT(Name LIKE '%orbs%') AND AccountId='001E000000M4pZEIAZ' LIMIT 4]

 

Cannot figure out what is wrong in this SOQL WHERE clause combining NOT LIKE with another clause?

Best Answer chosen by Admin (Salesforce Developers) 
James GJames G

Try this...

 

SELECT Id, Name, AccountId FROM Contact WHERE (NOT Name LIKE '%orbs%') AND (AccountId='001E000000M4pZEIAZ') LIMIT 4