Timeline for can I use a SET statement in a Marketing Cloud QUERY?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 2, 2017 at 2:39 | comment | added | Cameron Robert | Were you able to make it work George? You can try using a BETWEEN operator in your WHERE clause to make it easier. See: w3schools.com/sql/sql_between.asp | |
Apr 2, 2017 at 1:25 | comment | added | George Rosedale |
Here's what I tried: SELECT SubscriberKey as email, DateUnsubscribed as BMT_unsubscribe_date, Status, CASE WHEN Status = 'UNSUBSCRIBED' THEN 'FALSE' ELSE 'TRUE' END as 'BMT_subscribed' FROM _Subscribers WHERE DATEPART(mm,DateUnsubscribed) = DATEPART(mm,DateAdd(d,-1,GetDate())) AND DATEPART(dd,DateUnsubscribed) = DATEPART(dd,DateAdd(d,-1,GetDate())) AND DATEPART(yyyy,DateUnsubscribed) = DATEPART(yyyy,DateAdd(d,-1,GetDate()))
|
|
Mar 26, 2017 at 23:12 | comment | added | Cameron Robert | Hey @GeorgeRosedale, post a new question and include your query (and as much detail as possible) and the community can try to help you. | |
Mar 26, 2017 at 20:12 | comment | added | George Rosedale | Thanks, Cameron! I gave it a go, and while the syntax was correct it never ended up writing to the ENT.DE that I selected... so, back to plan A (which is really a plan B!) of importing into a DE with a default value of "FALSE" and moving that data around. | |
Mar 26, 2017 at 2:35 | history | answered | Cameron Robert | CC BY-SA 3.0 |