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
CloudMikeCloudMike 

Querying Picklists

Ok, this seems a little silly but am I to understand that you cannot use the LIKE operator on Picklist type fields? If the field only stores a single text item and you can't use LIKE? I know that the following isn't supported.

SELECT Id, Account, HQ_State__c FROM Account WHERE HQ_State__c LIKE 'A%'

Is there no way to find records with partial matches as a picklist entry as in the following?

For example, let say I have a picklist field called HQ_State__c for the various states in the US. Since it appears that LIKE isn't supported, can anyone suggest how I can query for all the records that have a state that starts with 'A%' for example? Using the following syntax is NOT an option for the problem I'm trying to solve:

SELECT Id, Account, HQ_State__c FROM Account
WHERE HQ_State__c = 'Alabama'
OR HQ_State__c = 'Alaska'
OR HQ_State__c = 'Arizona'
OR HQ_State__c = 'Arkansas'

Finally, if there is no solution for this, how soon can we expect a fix for this limitation in the future?

Thanks in advance!