CREATE DEFINER=`aerion`@`192.180.1.5` TRIGGER `prosp_consult_log_AINS` AFTER INSERT ON `prosp_consult_log` FOR EACH ROW begin insert into log_global set last_update = now(), updater = (select concat(firstname, ' ',lastname) from emp where emp_id = NEW.emp_id), table_update = 'prosp_consult', actions = NEW.trans_type, table_id = New.prosp_consult_id, col1 = concat('f_name','.',NEW.prosp_first_name), col2 = concat('l_name','.',NEW.prosp_last_name), col4 = concat('LEVEL:',NEW.prosp_level), col5 = concat('smry','.',NEW.prosp_summary), col7 = concat('tags','.',NEW.prosp_tags), col10 = CONCAT('called_on','.',NEW.called_on), col11 = CONCAT('next_call_dt','.',NEW.next_call_dt), col12 = CONCAT('notes','.',NEW.call_note), col13 = concat('contact','.',NEW.prosp_contact), col14 = concat('Attach :',NEW.prosp_attach); END