function in SQL to identify whitespace

  • I was wondering if there was a function in SQL Server to identify white space in the way the null works:

    Case itemA is null then

     

    Case itemA is null then

     

    Is there a function in SQL to identify white space?

    the way that null works:

    CASE itemA IS NULL THEN

    or

    isNull(itemA,'')

  • Take a look at CHARINDEX(). It can be used for just about any character or stream of characters.

    K. Brian Kelley
    @kbriankelley

  • Thank. I will try that.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply