• Aditya 8
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
SELECT Name, Payroll_Cd__c, Non_Payroll_Cd__c, Account_Status__c, Type, Non_Payroll_Eff_Dt__c, Non_Payroll_Exp_Dt__c  
FROM Account
WHERE   RecordType.Name = 'CORP_SALES' AND Account_Status__c = 'Active' AND (Type = 'Employer' OR Type ='Partner') AND Payroll_Cd__c  Like '%3253'

So here is the thing when i use " like" it works for all records and if i use the same query with "=" it  doesn't work for all records. But if i change the code to someother like Ex 3251 and put "=" it works i dont know whats wrong. Please if anyone faced the same issue your suggestions are much needed.

Thanks.
SELECT Name, Payroll_Cd__c, Non_Payroll_Cd__c, Account_Status__c, Type, Non_Payroll_Eff_Dt__c, Non_Payroll_Exp_Dt__c  
FROM Account
WHERE   RecordType.Name = 'CORP_SALES' AND Account_Status__c = 'Active' AND (Type = 'Employer' OR Type ='Partner') AND Payroll_Cd__c  Like '%3253'

So here is the thing when i use " like" it works for all records and if i use the same query with "=" it  doesn't work for all records. But if i change the code to someother like Ex 3251 and put "=" it works i dont know whats wrong. Please if anyone faced the same issue your suggestions are much needed.

Thanks.