2013R2 date-based target group date arithmetic in quotes
Posted: Wed Sep 24, 2014 5:21 am
First time for me to create new date-based target group ever since upgrading from 2013 to 2013R2. It looks like it now encloses any filter clause in quotes, causing it to be treated as a string. I installed a new openemm instance to make sure it's not just happening to my live machine. I created a simple change_date = current_timestamp target definition, and here's what is stored in the database:
Obviously date_format(cust.CHANGE_DATE, '%Y%m%d') ='current_timestamp' won't match anything. For now I work around this by manually modifying the target_sql value in the database.
Code: Select all
mysql> select * from dyn_target_tbl\G
*************************** 1. row ***************************
target_id: 1
company_id: 1
target_shortname: Name
target_description: Description (optional)
target_sql: ( date_format(cust.CHANGE_DATE, '%Y%m%d') ='current_timestamp' )
target_representation: �� sr 0org.agnitas.target.impl.TargetRepresentationImpl���c�� LallNodest Ljava/util/ArrayList;xpsr java.util.ArrayListx����a� I sizexp w sr &org.agnitas.target.impl.TargetNodeDatchainOperatorZ closeBracketAfterZ openBracketBeforeI primaryOperatorL
dateFormatt Ljava/lang/String;L primaryFieldq ~ L primaryFieldTypeq ~ L primaryValueq ~ xp tyyyymmddt CHANGE_DATEt DATEt current_timestampx
deleted: 0
change_date: 2014-09-24 04:07:14
creation_date: 2014-09-24 04:07:12