delete from tn_fod_CudaysDetail where ddid in (select ddid from(
select min(ddid) ddid ,a.cdid,a.mjcc,a.cpid from tn_fod_CudaysDetail a join(
select cdid,mjcc,cpid from tn_fod_CudaysDetail where cdid
in( select cdid from tn_fod_cudays where cuid = '268938' and cddate > '2019-02-10 00:00:00' )
group by cdid,mjcc,cpid having count (cpid) >1) bb on bb.cdid = a.cdid and
bb.mjcc = a.mjcc and bb.cpid = a.cpid
group by a.cdid,a.mjcc,a.cpid) cc )
mssql删除重复数据
最新推荐文章于 2022-10-15 16:27:46 发布