/* * Returns true if the specified string is null or whitespace, otherwise returns false. * @param @inString - A nvarchar(max) to check for null/whitespace. */ createfunction[dbo].[IsNullOrWhiteSpace] ( @inStringnvarchar(max) ) returnsbit as begin return case when@inStringisnullorltrim(rtrim(@inString))=''thencast(1asbit) elsecast(0asbit) end end GO GRANTEXECUTEON[dbo].[IsNullOrWhiteSpace]TO[MssExec] GO