ALTER Proc [dbo].[sp_ModuleAccess] ( @UserId nvarchar(50)=null, @Module nvarchar(50)=null, @SubModule nvarchar(50), @Status bit=null, @Mode char(1)=null ) AS declare @moduleID table ( idx smallint Primary Key IDENTITY(1,1) , moduleid nvarchar(50) ) declare @SubmoduleID table ( idx smallint Primary Key IDENTITY(1,1), moduleid nvarchar(50), submoduleid nvarchar(50), status bit ) Begin if @Mode='U' Begin if exists(select 1 from Table1 where UserID=@UserId) begin update Table1 set Status=@Status where UserID=@UserId and ModuleID=@Module and SubModuleID=@SubModule end end END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)