How can I check if a string consists of letters or numbers ONLY in Transact-SQL?
Here the string has datatype nchar
, 'letters' specifically refer to latin characters. Database environment is Microsoft SQL Server 2014.
Example for desired result:
C172E returns True
412?A returns False //'?' is neither a letter nor a number
I've done some searching but only found the built-in ISNUMERIC()
function, which is for numbers only.
Is there a Transact-SQL solution for this problem?