Page 1 of 1

current_timestamp in target_sql

Posted: Mon May 12, 2008 11:20 pm
by jhagstrand
Target group specifications are saved in the dyn_target_tbl table. When you follow the instructions in the OpenEMM documentation, section 5.3.2 Date Functions, regarding current_timestamp, the value OpenEMM puts into the target_sql column is invalid SQL and does not work.

The work around is to manually update the dyn_target_tbl table and change the target_sql value as follows.

wrong: date_format(cust.created, '%Y%m%d') ='current_timestamp-1'
right: date_format(cust.created, '%Y%m%d') = date_format(current_timestamp, '%Y%m%d')-1

ACK

Posted: Wed May 14, 2008 9:10 pm
by tobiask
Hi,

Thanks for this information! I had the same problem, your "hotfix" saved my day / night! It would be great if this could be fixed soon since this is an uggly bug. ;-)

Best regards,
Tobias

BTW - here is my sql statement:

Code: Select all

update dyn_target_tbl set target_sql = "date_format(cust.birthday_lastdate, '%Y%m%d') = date_format(current_timestamp, '%Y%m%d')" where target_id = 2;
You should of course adapt the target_id.

Posted: Thu May 15, 2008 3:40 pm
by maschoff
We could confirm your bug report and will fix this issue in the next release of OpenEMM. Thank you both for your postings (and your patience :-) )!