/* * Retrieves the current validation value by key name that is currently * effective. */ CREATEPROCEDURE[dbo].[GetValidationByKey] @inNameKeyvarchar(16) as setnocounton
selecttop(1) KeyValue fromValidation whereNameKey=@inNameKeyand EffectiveDateUtc<=getutcdate() orderbyNameKeyasc,EffectiveDateUtcdesc,ExpirationDateUtcdesc GO GRANTEXECUTEON[dbo].[GetValidationByKey]TO[MssExec] GO