Uknown Column new in FIELD LIST Mysql Trigger -


i have following trigger supposed insert on trigger table after insert. keep on getting following error : unknown column field in list

below trigger :

drop trigger if exists `trgr_client_statement_report`;create definer=`uniquelo`@`localhost` trigger `trgr_client_statement_report` after insert on `statement` each row insert trgr_statement    ( `amnt_cr`, `amnt_dr`, `approved`,  `clnt_id`,`date_added`,`days`, `description`,    `discount`,    `id_2`,     `invoiced`,     `invoice_no`,    `job_card_id`,    `payment_date`,    `payment_status`,    `pymnt_code`,    `pymnt_mthd`,    `qty`,    `rcpt_no`,    `status`)    values    ( new.`amnt_cr`,new.`amnt_dr`,new.`approved`,new.`clnt_id`,new.`date_added`,new.`days`,new.`description`,new.`discount`,new.`id`,new.`invoiced`,new.`invoice_no`,new.`job_card_id`,new,`payment_date`,new.`payment_status`,new.`pymnt_code`,new.`pymnt_mthd`,new.`qty`,new.`rcpt_no`,new.`status`) 

there syntax error in fieldlist. must use new.field not new,field : new,payment_date

drop trigger if exists `trgr_client_statement_report`;  create definer=`uniquelo`@`localhost` trigger `trgr_client_statement_report` after insert on `statement` each row insert trgr_statement    ( `amnt_cr`, `amnt_dr`, `approved`,  `clnt_id`,`date_added`,`days`, `description`,    `discount`,    `id_2`,     `invoiced`,     `invoice_no`,    `job_card_id`,    `payment_date`,    `payment_status`,    `pymnt_code`,    `pymnt_mthd`,    `qty`,    `rcpt_no`,    `status`)    values    ( new.`amnt_cr`,new.`amnt_dr`,new.`approved`,new.`clnt_id`,new.`date_added`,new.`days`,new.`description`,new.`discount`,new.`id`,new.`invoiced`,new.`invoice_no`,new.`job_card_id`,new.`payment_date`,new.`payment_status`,new.`pymnt_code`,new.`pymnt_mthd`,new.`qty`,new.`rcpt_no`,new.`status`) 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -