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