














--====下面语句把入厂前的旷工 和 离职后的旷工现象都清除掉了,但是无法清除离职前的旷工记录喔,因为违反逻辑了!-
update rb200802 set rb200802.kgxs=0 from rb200802,
(select * from (select * from (select no,rcrq,lzrq from rs where lzrq is not null or rcrq>='2008-02-01') as #t1 left join (select no as 'no2',kqrq,kgxs from rb200802 where kgxs>0) as #t2 on #t1.no=#t2.no2 and (#t1.lzrq is not null) and (#t2.kqrq is not null)) as #t3 where #t3.kgxs>0 and (#t3.kqrq>=#t3.lzrq or #t3.kqrq<#t3.rcrq)) as #t4 where Rb200802.no=#t4.no and Rb200802.kqrq=#t4.kqrq
--====承上over!-
文章来源:http://bbs.fzonet.com/rcds/ShowPost.asp?ThreadID=1650
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。