Skip to main content
add marketing-cloud tag, source code formatting
Source Link
Adam Spriggs
  • 31.1k
  • 6
  • 44
  • 88

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT 
  EmailAddress as SubscriberKey
  , EmailAddress
  , first_name
  , last_name
  , registration_date  
FROM Wild_Spirit_12pm h  
WHERE h.EmailAddress IN (
   (SELECT s.SubscriberKey    
   

 FROM _Sent s     
   INNER JOIN _Job j   ON s.JobID = j.JobID    
 
   WHERE j.EmailID = '2457224'   
   AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!/* this is where i need it send 1 day before 6/28/16. */

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN    (SELECT s.SubscriberKey     

 FROM _Sent s    
INNER JOIN _Job j   ON s.JobID = j.JobID    
 
WHERE j.EmailID = '2457224'     AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT 
  EmailAddress as SubscriberKey
  , EmailAddress
  , first_name
  , last_name
  , registration_date  
FROM Wild_Spirit_12pm h  
WHERE h.EmailAddress IN (
   SELECT s.SubscriberKey    
   FROM _Sent s     
   INNER JOIN _Job j ON s.JobID = j.JobID   
   WHERE j.EmailID = '2457224' 
   AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) /* this is where i need it send 1 day before 6/28/16 */
deleted 9 characters in body
Source Link
Ashwani
  • 22.7k
  • 4
  • 41
  • 73

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN (SELECT s.SubscriberKey FROM _Sent s INNER JOIN _Job j ON s.JobID = j.JobID WHERE j.EmailID = '2457224' AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.

thank you all,

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN    (SELECT s.SubscriberKey     

FROM _Sent s    
INNER JOIN _Job j   ON s.JobID = j.JobID    

WHERE j.EmailID = '2457224'     AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN (SELECT s.SubscriberKey FROM _Sent s INNER JOIN _Job j ON s.JobID = j.JobID WHERE j.EmailID = '2457224' AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.

thank you all,

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN    (SELECT s.SubscriberKey     

FROM _Sent s    
INNER JOIN _Job j   ON s.JobID = j.JobID    

WHERE j.EmailID = '2457224'     AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.
Source Link
Angel
  • 27
  • 1
  • 4

I need an email sent on a specific date/time. Query needs to pop data ext. 1 day before date/time

I need an email sent on a specific date, my current query populates a data extension from the difference of days since the users received a particular "email id". What would be the best way to have this query populate a new data ext 1 day before the given date?

SELECT EmailAddress as SubscriberKey, EmailAddress, first_name, last_name, registration_date FROM Wild_Spirit_12pm h WHERE h.EmailAddress IN (SELECT s.SubscriberKey FROM _Sent s INNER JOIN _Job j ON s.JobID = j.JobID WHERE j.EmailID = '2457224' AND DATEDIFF(Day, s.EventDate, Getdate()) = 1) !!!this is where i need it send 1 day before 6/28/16.

thank you all,