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
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

AAA

BBB

1CD

 

The query should get me '1CD'

 

Thank you

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

Reza,

 

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>