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.



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

| improve this answer | |
  • Great! That's working-thanks @edu8rdo! – CreetureFeeture Aug 10 '14 at 2:26

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

| improve this answer | |
  • 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 '14 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.