0

I have the written the query below to return two values. I have also check the DE to ensure that it has the correct data types. Unfornately, the query is not returning any values:

SELECT
M.EmailAddress  EmailAddress 
,M.PersonHasOptedOutOfEmail PersonHasOptedOutOfEmail

FROM

MasterSubscriberDE M

JOIN  [4DaySend] F

ON M.SubscriberKey = F.SubscriberKey

WHERE 

PersonHasOptedOutOfEmail = 'False'

Here is a screenshot of the Data Extension:

enter image description here

I know its a very basic query but I seem to be missing a trick and stumped by this. Help will be much appreciated.

  • If you run it in an automation does it get an error or run successfully? – Adam Spriggs Feb 13 '17 at 15:18
  • And why are you not referencing the DE to which you are joining? – Adam Spriggs Feb 13 '17 at 15:18
3

Boolean values can be represented with 1 or 0. Assuming the there's not always going to be a match in 4DaySend, I'd do something like this:

SELECT
M.EmailAddress  EmailAddress 
, M.PersonHasOptedOutOfEmail PersonHasOptedOutOfEmail
FROM MasterSubscriberDE M
LEFT JOIN  [4DaySend] F ON (M.SubscriberKey = F.SubscriberKey)
WHERE m.PersonHasOptedOutOfEmail = 0

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.