fnUserInRole
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ClientUsersID | int | IN | |
| @ClientRolesID | int | IN |
Definition
Copy
CREATE FUNCTION [dbo].[fnUserInRole]
(
@ClientUsersID int,
@ClientRolesID int
)
RETURNS bit
AS
BEGIN
declare @AtLeast1 bit
set @AtLeast1=0
IF EXISTS (SELECT TOP 1 ClientRolesID FROM UserRoles WHERE ClientRolesID=@ClientRolesID AND ClientUsersID=@ClientUsersID )
set @AtLeast1=1
RETURN @AtLeast1
END