日期:2014-05-17 浏览次数:20790 次
CREATE PROCEDURE spUpdateWageRecord @ItemName VARCHAR(50), @ItemValue MONEY, @ID VARCHAR(4) AS IF NOT EXISTS(SELECT gj.GH FROM GZ_JLB gj WHERE gj.GH = @ID) INSERT INTO GZ_JLB(GH,XM) SELECT zpu.GH, zpu.XM FROM ZD_PER_USER zpu WHERE zpu.GH = @ID; --判断是否有此人,没有就插入 UPDATE GZ_JLB SET (SELECT gx.xmdm FROM GZ_XMB gx WHERE gx.xmmc = @ItemName) = @ItemValue WHERE GH = @ID