删除上下查数据
单据上下查的关联关系是放在 T_BF_INSTANCE (流程实例表)
LK表主要用于反写规则使用
所以需要删除上下查数据的时候应该去T_BF_INSTANCEENTRY删,仅仅删除lk表是无用的
【生产订单-工序计划】
--删除T_SFC_OPERPLANNING_LK select t.FLINKID from T_SFC_OPERPLANNING_LK t left join T_PRD_MOENTRY t1 on t.FSID=t1.FENTRYID left join T_PRD_MO t2 on t2.FID=t1.FID where t.FID in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081') and t2.FBILLNO<>'WORK192584' --delete from T_SFC_OPERPLANNING_LK where FLINKID in (select t.FLINKID --from T_SFC_OPERPLANNING_LK t --left join T_PRD_MOENTRY t1 on t.FSID=t1.FENTRYID --left join T_PRD_MO t2 on t2.FID=t1.FID --where t.FID in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081') --and t2.FBILLNO<>'WORK192584') --删除T_BF_INSTANCEENTRY select * from T_BF_INSTANCEENTRY where FSTABLENAME='T_PRD_MOENTRY' --下游明细表 and ftid in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081') and FSID not in (select FSID from T_SFC_OPERPLANNING_LK t left join T_PRD_MOENTRY t1 on t.FSID=t1.FENTRYID left join T_PRD_MO t2 on t2.FID=t1.FID where t.FID in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081')) --delete from T_BF_INSTANCEENTRY --where FSTABLENAME='T_PRD_MOENTRY' --and ftid in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081') --and FSID not in (select FSID --from T_SFC_OPERPLANNING_LK t --left join T_PRD_MOENTRY t1 on t.FSID=t1.FENTRYID --left join T_PRD_MO t2 on t2.FID=t1.FID --where t.FID in (select FID from T_SFC_OPERPLANNING where FBILLNO='OP012081'))
删除上下查数据
单据上下查的关联关系是放在 T_BF_INSTANCE (流程实例表)LK表主要用于反写规则使用所以需要删除上下查数据的时候应该去T_BF_INSTANCEEN...
点击下载文档
本文2024-09-16 17:15:22发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-14534.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章