0

I am trying to find campaign members for campaigns executed in last 2 years (not via Apex), in order to migrate this data. Using Jitterbit.

I have tried couple different queries (from developer console) and can't seem to get the right query. Campaign is a lookup on CampaignMember, so should I not be able to use the __r notation to access?

SELECT Id, CampaignId, ContactId, CreatedById, CreatedDate, FirstRespondedDate, HasResponded, IsDeleted, LastModifiedById, LastModifiedDate, LeadId, Status, SystemModstamp 
FROM CampaignMember
where CampaignId = Campaign__r.id and Campaign__r.CreatedDate >= LAST_N_YEARS:2

1 Answer 1

0

How about...

SELECT Id, CampaignId, ContactId, CreatedById, CreatedDate, FirstRespondedDate, HasResponded, IsDeleted, LastModifiedById, LastModifiedDate, LeadId, Status FROM CampaignMember WHERE CampaignId IN (SELECT Id FROM Campaign where CreatedDate > 2013-04-01T00:00:00Z)

?

1
  • please upvote if you like it Commented Apr 22, 2015 at 6:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .