改动如下:
SET SAFETY off
USE 银企数据库
excl
SELECT 银企数据库.fk AS fk,银企数据库.dz AS dz FROM 银企数据库 inne JOIN 退信库 ON 银企数据库.fk=退信库.fk AND 银企数据库.dz=退信库.dz
into tabl 本次死信
*COPY TO 本次死信
SELECT 银企数据库.fk AS fk_a,银企数据库.dz AS dz_a,退信库.dz AS dz_b FROM 银企数据库 inne JOIN 退信库 ON 银企数据库.fk=退信库.fk AND 银企数据库.dz<>退信库.dz
into tabl 本次死信更新
*COPY TO 本次死信更新
delete
from
银企数据库
where
fk
in
(select
fk
from
本次死信)
PACK
CLOSE ALL
SET SAFETY ON
QUIT