sp_helptext proc_SetJurisdiction go CREATE proc proc_SetJurisdiction ( @p_id varchar(40), @staffs varchar(300), @groups varchar(300) ) as begin begin tran begin try if exists(select * from Project_Jurisdiction where p_id = @p_id) begin delete from Project_Jurisdiction where p_id =@p_id end if(@staffs<>'') begin insert into Project_Jurisdiction(p_id,j_id,j_type) select @p_id p_id,id j_id,0 j_type from F_Char_s(@staffs) end if(@groups<>'') begin insert into Project_Jurisdiction(p_id,j_id,j_type) select @p_id p_id,id j_id,1 j_type from F_Char_s(@groups) end commit tran select '1' end try begin catch rollback tran select '0' end catch end
本文介绍了一个用于设置项目中人员及团队权限的SQL存储过程。该过程通过输入项目ID、人员ID列表和团队ID列表来更新项目的权限设置,并确保权限信息的准确性。
1万+

被折叠的 条评论
为什么被折叠?



