Search code examples
salesforceapexsoql

Using SOQL to query Identities using LIKE statement/keyword


HI I was wondering If we could use SOQL statements using LIKE on Identities like:

select Id,Name from Account where Id not LIKE '001W%' limit 10

So if there were ID strings that start with those 4 characters I can skip those and get 10 that are different. I tried but I get an exception indicating that I have an 'unexpected token'.

Thanks


Solution

  • According to the salesforce documentation:

    The LIKE operator is supported for string fields only.