+ Start a Discussion
Reza SarwariReza Sarwari 

SOQL - Show Items which does not start with a letter

hello i have a simple question,

i need a soql query which gets me all records from an object, where the records in a field do not start with a letter.

For example in de Account object the names are





The query should get me '1CD'


Thank you

Best Answer chosen by Admin (Salesforce Developers) 
Platy ITPlaty IT



There's nothing in SoQL to limit it to a letter, so you'll need to do include a filter to find each number it could start with, like this:

Select Id, Name from Account where Name like '1%' or Name like '2%' <... and so on for each number>