• Debra Price 25
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I'm using Dataloader to export data and need to limit the OR's in my query, because I have so many data fields in the where clause. is there a way to use the In clause for two or more fields for example or possibly a query with a sub query in dataloader?
Object = Contact
Where Clause Fields
  • name
  • Email
  • Email2__c
  • Email3__c
  • Email4__c
Basic Query
Select id, name, account.name, MobilePhone, HomePhone, OtherPhone, Email, Email2__c, Email3__c, Email4__c, accountid
from contact
(name = 'Abdulaziz Al-Saleh' and ( email='Abdulaziz.Al-Saleh@samba.com' or email2__c='Abdulaziz.Al-Saleh@samba.com')) or
(name = 'Abdullah Al-Rasheed' and ( email='Abdullah.Al-Rasheed@samba.com' or email2__c='Abdullah.Al-Rasheed@samba.com')) or
(name = 'alison@lakemoreuk.com' and ( email='alison@lakemoreuk.com' or email2__c='alison@lakemoreuk.com')) or
(name = 'Amjad Showail' and ( email='Amjad.Showail@samba.com' or email2__c='Amjad.Showail@samba.com'))

There are many more OR clauses to follow. I would like to avoid all the OR clauses however i need both the name and the temail addresses in  the where clause.