current_timestamp in target_sql

Use this forum to report bugs and to check for bugfixes and new releases of OpenEMM

Moderator: moderator

jhagstrand
Posts: 22
Joined: Thu Apr 17, 2008 8:38 pm

current_timestamp in target_sql

Post 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
tobiask
Posts: 4
Joined: Wed Apr 23, 2008 2:08 pm

ACK

Post 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.
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post 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 :-) )!
OpenEMM Maintainer
Post Reply