I want to send a delivery excluding everyone who has not opened an email in the last 180 days. When adding into a query the delivery, it only allows me to select deliveries one by one, I cannot select all, nor I can select a date range.
What is the easiest way to achieve this?
Solved! Go to Solution.
When doing that, I get the following errors:
WDB-200001 SQL statement 'INSERT INTO wkf61230670_1_1 (iId) SELECT DISTINCT N0.iRecipientId FROM NmsRecipient N0 WHERE ( EXISTS (SELECT 1 FROM NmsBroadLogAppSubRcp N1 WHERE (N1.iProfileId = N0.iRecipientId) AND ((((N1.iStatus = 1) AND (N1.tsEvent >= DaysAgo(180) AND N1.tsEvent < GetDate())) AND ))) OR EXISTS (SELECT 1 FROM NmsBroadLogRcp N1 WHERE (N1.iProfileId = N0.iRecipientId) AND ((((N1.iStatus = 1) AND (N1.tsEvent >= DaysAgo(180) AND N1.tsEvent < GetDate())) AND ))) ) AND ((N0.iRecipientId > 0 OR N0.iRecipientId < 0))' could not be executed.
PGS-220000 PostgreSQL error: ERROR: syntax error at or near ")" LINE 1: ... >= DaysAgo(180) AND N1.tsEvent < GetDate())) AND ))) OR EXI... ^
I just did it again and got the 3results. When i did query against delivery logs status sent and event date corresponds to last 180days gave me 10 results and after adding tracking logs doesn't exists condition brought down the count to 3. Verified the profiles and they didn't open any emails received. Also hope you have set the target and filtering dimension as profile.
You may try adjust the event date from 180days to something else and see how that works.
Do you have any deliveries that are in sent state between the dates you choosen? and If you have any delivery then try to choose one specific delivery (change the criteria from event date to delivery label) and see whether you're getting some count without any error. Just to see if that works.