0

I want to see all emails sent to a specific subscriber

I have created a DE with the field subscriberKey is only and primary key I then want to set up an Query Activity based on the Query

SELECT j.EmailName, s.EmailAddress from  _Job j 
INNER JOIN _Sent se on j.JobID = se.JobID
INNER JOIN _Subscribers s ON se.SubscriberKey = s.SubscriberKey
WHERE se.EventDate < GetDate()

However as the subscriberKey is required within my Target DE I get this error message when I want to save the Query

A problem occurred creating your query definition. Please contact Customer Service for additional information. Name: Email sent to spec individual External Key: a7fc18e8-051d-4f53-8d98-5bf73b0dc6f8 Error saving the Query field.Field 'SubscriberKey' is a required for the Target Data Extension. Ensure this field is specified in your query text.

Where do I enter the subscriberKey for the specific individual in the query text?

1

You need to also select the susbcriberkey in your query or make it not required.

Try this:

SELECT 
s.SubscriberKey
,s.EmailAddress as Email
,j.EmailName
,s.EmailAddress from  _Job j 
INNER JOIN _Sent se on j.JobID = se.JobID
INNER JOIN _Subscribers s ON se.SubscriberKey = s.SubscriberKey
WHERE se.EventDate < GetDate()
|improve this answer|||||
  • I added you query text in my query and it errored saying I needed at least on non-required field in my DE so I added Email adress as second field – BLEIKster Jul 6 '17 at 9:29
  • When I save the query now it gives me the error message – BLEIKster Jul 6 '17 at 9:30
  • An error occurred saving the definition: A problem occurred creating your query definition. Please contact Customer Service for additional information. Name: Email sent to spec individual External Key: a7fc18e8-051d-4f53-8d98-5bf73b0dc6f8 Error saving the Query field.Field 'Email' is a required for the Target Data Extension. Ensure this field is specified in your query text. – BLEIKster Jul 6 '17 at 9:30
  • Can you please take a screen shot of your target data extension? So we can add all required fields?? adding email now – Samuel Dare Jul 6 '17 at 9:33
  • Have you tried it? Added an alias tag to the email line – Samuel Dare Jul 6 '17 at 12:02

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.