[dbo].[HasTrueValueForGlobalSystemOption]
CREATE FUNCTION [dbo].[HasTrueValueForGlobalSystemOption]
(
@optionName varchar(128)
)
RETURNS bit
AS
BEGIN
declare @retVal bit
select @retVal = convert(bit,
case
when exists (select top 1 1 from GlobalSystemOption where Name = @optionName and [Value] = 'True') then 1
else 0 end )
return @retVal;
END
GO
GRANT EXECUTE ON [dbo].[HasTrueValueForGlobalSystemOption] TO [MssExec]
GO