Last active
February 13, 2019 15:06
-
-
Save MyCueCards/8822dd60e642d911e126a09f76b415e3 to your computer and use it in GitHub Desktop.
In Salesforce Marketing Cloud, this query finds records within the All Subscriber List. The records it finds are those agents designated as "2", as well as a portion of the company name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT pde.SubKey AS SubscriberKey, pde.Email AS EmailAddress | |
FROM AgentDataExtension ade | |
INNER JOIN PrimaryDataExtension pde ON pde.Agent_Number = ade.AgentNumber | |
WHERE ade.AgentSettingsID = 2 OR pde.Email LIKE '%company name%' | |
UNION | |
SELECT SubscriberKey, EmailAddress | |
FROM _ListSubscribers | |
WHERE ListID = 000 AND EmailAddress LIKE ‘%company name%’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment