CREATE PROCEDURE rl_checkemployee
AS
--将在职字段为是,待转正字段为否,并且到公司超过两个月的员工的状态字段改为红色的"待转正"
Update rl_employee_info set Einfo_status='<font color=red>待转正</font>' where Einfo_ifon = '是' and Datediff(day,getdate(),Einfo_ontime) > 60 and Datediff(day,getdate(),Einfo_ontime) <90
GOEinfo_ontime是rl_employee_info的一个字段,按我上面的写法,虽然没有报错,但根本没有影响到一个记录,等于没用我的本意是这样的,如果Einfo_ontime这个字段中存储的值和当前系统时间的日期之差在60和90之间,时,就把该条记录的Einfo_status的值改掉有人能帮帮我吗?