1

So I am really new to this SFMC platform, but not salesforce, nor SQL. I have a query that should return all subscribers, just for a test. No matter what I do, or what query I write, I get nothing back. 0 records every time. I first started with this query:

select 
c.subscriberid
, c.subscriberKey
, s.EmailAddress
, c.EventDate 
from _Subscribers as s 
left join _Click as c on (c.subscriberId = s.subscriberId) 
left join _Open as o on (o.subscriberId = s.subscriberId) 
where     
o.eventDate > '2016-07-01' 
AND c.eventDate > '2016-07-01'

I got nothing back, so then I tried to make a simple query that would have to return something. So I ran this:

SELECT top 5 subscriberKey, subscriberId, EmailAddress from _subscribers

I even tried this:

SELECT subscriberKey, subscriberId, EmailAddress from _subscribers

And still, in my data extensions, I get nothing back. Syntax validates, data extension validates, but 0 records. Can anyone direct me as to what I am doing wrong here? Seems pretty simple, but nothing I have tried works. At all. Thanks!

  • Did you ever get this working? – Adam Spriggs Oct 3 '16 at 15:00
0

If you're executing the query from an Enterprise 2.0 child business unit, then you'll need to prefix _subscribers with ent.:

select 
c.subscriberid
, c.subscriberKey
, s.EmailAddress
, c.EventDate 
from ent._Subscribers as s 
left join _Click as c on (c.subscriberId = s.subscriberId) 
left join _Open as o on (o.subscriberId = s.subscriberId) 
where     
o.eventDate > '2016-07-01' 
AND c.eventDate > '2016-07-01'

In an E2.0 account, subscribers are shared across all business units.

| improve this answer | |
  • Thanks for the reply, but every time I put the ent in front of subscribers, it throws an error: The 'Ent.' prefix can only be used to query data in a parent account from a child account. – Abradolf Lincler Sep 16 '16 at 18:58
  • Does the query run successfully if you run it from a Program or Automation? – Adam Spriggs Sep 16 '16 at 20:31
  • 1
    I've only tried running it in the query builder in the gui. Ive been tasked with just running a specific query, but when I access the data extension to see the results, it's always 0. – Abradolf Lincler Sep 16 '16 at 21:12
  • Run it in an automation to ensure it's not erroring out behind the scenes. could be a problem with the primary key or field precision in your target data extension. – Adam Spriggs Sep 16 '16 at 21:27

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.