从加入日期起一个月后员工表工资自动增加的代码。 [英] Code for auto increment of salary of employee table after one month from joining date.

查看:79
本文介绍了从加入日期起一个月后员工表工资自动增加的代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为购物综合管理系统做一个项目。我不能写这段代码。请帮助我,这很紧急。

提前谢谢。

I am doing a project for Shopping complex management system. I can't write this code. Please help me, it is urgent.
Thanks in advance.

推荐答案

如果你的意思是自动增加那些员工的工资,其加入日期是正好一个月后:

If you mean auto increment those employees' salary whose join date is exactly one month from now:
update table1 set salary=salary+increment
where
joindate = SELECT DATEADD(month, -1, DATEDIFF(dd, 0, GETDATE()))


这篇关于从加入日期起一个月后员工表工资自动增加的代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆