• howar dellis
  • NEWBIE
  • -1 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,
I want to write a query like this:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name not like 'Test%'.
 
The above query throws SOQL exception.
 
It works and runs when I remove the NOT operator as shown below:

select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c='Allow Relationships To Be Created' and Account__r.Name like 'Test%'
 
My questions is: Does SOQL support "NOT LIKE" operator. If no, then what is the alternative to achieve a similar operation.
 
Thanks for all your feedbacks.
Ambili
  • October 16, 2007
  • Like
  • 1