0

I have email addresses in a Data Extension and am trying to query All Subscribers to pull in their Subscriber Key. I wrote my Query, it validates, ran the SQL and it returned no records. Not sure where I went wrong.

Select
a.SubscriberKey,
EmailAddress
from [_subscribers] a
join [NameofDEwhereEmailAddressesAreStored] de
on de.Email = a.EmailAddress

I then have a new DE to point the SQL query to put the information.

  • 3
    although the default join is inner join, I would recommend explicitly stating it. Also, I would put an alias on EmailAddress in the Select statement (a.EmailAddress) to again remove ambiguity and reduce risk of misinterpretation. Outside of that, I would verify if you are in a child account or the parent account. If in a child account, you should use the prefix ent. on the Data View. So it would be from ENT.[_subscribers] a. This tells the query to look at the enterprise level (parent) for the data view. This is where the all subscribers list lives. – Gortonington Apr 13 at 19:52
1

Moving from Comment to Answer for better visibility:

To start with, I would clean up your query a bit to ensure it is not something with a misinterpretation of ambiguity. Although the default join is inner join, I would recommend explicitly stating it to ensure understanding of your intention as well as to make it an easy reference when reviewing the code. Also, I would put an alias on EmailAddress in the Select statement (a.EmailAddress) to again remove ambiguity and reduce risk of misinterpretation.

Outside of that, I would verify if you are in a child account or the parent account. Because if you are in a child account, you should use the prefix ENT. on the _Subscribers Data View. Making it become from ENT.[_subscribers] a.

This tells the query to look at the enterprise level (parent) for the data view, which is where the 'All Subscribers' list lives.

| improve this answer | |

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.