0

Requirement:- In account object i have one field with name approve_Profile__c.

i have 1Lakh of account records. I need to check for this(approve_Profile__c) field for data.

Select id,approve_Profile__c from account where approve_Profile__c like 
'%system administartor%' or approve_Profile__c like '%standard user%' or 
approve_Profile__c like '%chatter user%'

But i have 261 profiles with me ,So instead of writing field name and like operator every time ,is there any other way to search profile names in account records

3
  • What is Data Type of field approve_Profile__c? text or lookup? Which profiles you want to check all? few? please elaborate your question a bit more. – abdn Oct 28 '15 at 12:09
  • Data type is -Text and I need to check all profiles one by one or in one shot.Please share if you have any solution please. – ajay bagdad Oct 29 '15 at 4:36
  • You can query it by filtering in where clause e.g. Where approve_Profile__c != null. – abdn Oct 29 '15 at 12:12
0

As it seems that you want to query every account that has a value in approve profile then i would use. Select id,approve_Profile__c from account where approve_Profile__c != ''

this query will return you all the accounts where approve_Profile__c is not empty. This will work as long as the only value in this field is 1 of your 261 profiles

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.