What is the best way to code this?CREATE FUNCTION [dbo].[CanSetRole]( @requestorRoleId int, @roleId int)RETURNS bitASBEGIN RETURN When @requestorRoleId =(16,62,47,52) and @RoleID in (1-38) then 1 else 0 When (@requestorRoleId = (16) and @RoleID in (40-64) then 1 else 0When (@requestorRoleId = (62) and @RoleID in (56-64) then 1 else 0When (@requestorRoleId = (47) and @RoleID in (40,48,49,50,55) then 1 else 0ELSE 0ENDGO
DaveHelixpoint Web Developmenthttp://www.helixpoint.com