Sql query to check uppercase letter is present in the string

By
Advertisement
In this article i am going to explain about the query used to to check uppercase letter is present in the string.

Below is the query which i used to do this operation. It will return 1 if the upper case letter is there otherwise returns 0.


DECLARE
      @TestString VARCHAR(100)

SET @TestString = 'Sarat'

SELECT CASE WHEN BINARY_CHECKSUM(@TestString) = BINARY_CHECKSUM(LOWER(@TestString)) THEN 0 ELSE 1 END AS DoesContainUpperCase
GO

0 comments:

Post a Comment

Online Casino