+ Start a Discussion

SOQL query to show how much of a field is being used. in DataLoader...

I would like to have a SOQL query to see if a field contains more than 25 characters. The field is defined as a length of 255. Tried various ways with LEN but no joy. Any suggestions on how this can be accomplished


Select o.Purchase_Order__c from Opportunity o Where LEN() o.Purchase_Order__c > 25


ery to see if there



You'd need to create a new formula field first that calculated the field length, then you can query from SOQL, filtering on the formula field value, you can't directly call LEN from SOQL.


Thank for for the response. Wish they'd use SQL like the rest of the world. ;)