0

Right now I have this query which works great:

SELECT SubscriberID, EmailAddress
FROM ent._Subscribers WITH (NOLOCK)
WHERE SubscriberID = '1234567890'

But, since I want to find out EmailAddress of 1000s of SubIDs, I cannot do this manually by running query for each SubID.

I have a list of Subscriber IDs saved in a data extension in marketing cloud.

Is there any way I can run a query and it looks for the SubIDs from my data extension and saved the linked email address in a different DE along with SubID?

3

You can add a subquery to your where-clause. This would look like this:

SELECT allsub.SubscriberID, allsub.EmailAddress
FROM ent._Subscribers as allsub WITH (NOLOCK)
WHERE allsub.SubscriberID IN (
    SELECT ids.SubscriberID FROM YourOtherDataExtension as ids
)
| 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.