@delimiter $$;
CREATE DEFINER=`root`@`%` TRIGGER `gdssfw_case`.`UMTS_TODO_337086476D`
AFTER DELETE ON
gdssfw_case.aj_ajxx
FOR EACH ROW begin
declare oldPks varchar(2550);
declare oldFjm varchar(6);
select concat_ws(';','AJID','varchar',concat_ws(',',NULL,CONVERT(old.AJID,CHAR))) into oldPks;
insert into gdssfw_case.UNIMAS_15(dbname,tblname,pks,mark,act) values('gdssfw_case','aj_ajxx',oldPks,'1','d');
set oldFjm = old.FJM;
if oldFjm is not null then
call gdssfw_case.P_SYN_aj_ajxx_delelte(oldFjm,old.AJID);
end if;
end
$$
@delimiter;
$$