1

In Exact Target I am trying to query the _Subscribers Data View to return the email addresses of everyone that was added to the list for the previous day.

Here's what I started with:

SELECT EmailAddress

FROM _Subscribers

WHERE ListName = 'myList' AND DateJoined = DATE_SUB(CONCAT(CURDATE(), ' 00:00:00'), INTERVAL 1 DAY) AND Status = 'Active'

But NOW() and CURDATE() aren't supported in ET. I'm not sure what else to use.

2 Answers 2

3

Or...

SELECT EmailAddress
FROM _Subscribers
WHERE ListName = 'myList'
AND DateDiff(day,DateJoined,GetDate()) = 1

1
  • Great! That's working-thanks @edu8rdo! Aug 10, 2014 at 2:26
2

You need to use GETDATE(), which is the SQL Server version of this. Hope this helps.

1
  • The question was what to use instead of NOW() and CURDATE() which I answered, GETDATE(). That should not be a down vote, it's a legitimate answer.
    – Timothy
    Jul 31, 2014 at 13:17

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.