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

'like' Operator Issue in the Query..



     I applied 'Like' Operator on number field in the SOQL query.But it Showing an error that Like operator will not work on Number field types.


 I had the Number type field in database and also i Dont want to change the type here.


Then how to aplly 'Like' operator on number field in SOQL.Is there any other way to check the number starting with,like the functionality of 'Like' Operator.


You cannot use Like operator for numbers (restricted to text). You can use other operators like >,<,>= etc to Query based on




You can, however, create a formula field that displays the string equivalent of your number field, and then apply your LIKE operator to that.


Good luck!

Talha SaqibTalha Saqib
@SFF good approach