Hr_DepartPlanWeek 部门周计划表:DepartMent部门名称,DepartMentID部门ID。
g_group部门表:gname部门名称,gid部门id
根据DepartMentID管理g_group表修改DepartMent
update Hr_DepartPlanWeek set DepartMent=t.gname from (select gname,gid from g_group left join Hr_DepartPlanWeek on g_group.GId=Hr_DepartPlanWeek.DepartMentID )t where t.GId=Hr_DepartPlanWeek.DepartMentID
时间: 2024-11-06 19:48:32