CREATEFUNCTION[dbo].[udfIsMssWebAtlasSudsUploadActive] () RETURNSbit AS BEGIN returncasewhenexists( select1fromsecModules wheresecModules.Description='Atlas Suds Upload'andActive=1) then1 else0end END GO GRANTEXECUTEON[dbo].[udfIsMssWebAtlasSudsUploadActive]TO[MssExec] GO