SQL Server ISALPHA Function
Updated 2023-11-10 19:44:32.037000
Description
Use the scalar function ISALPHA to determine if a value contains only alphabetic characters [a-z][A-Z].
Syntax
SELECT [westclintech].[wct].[ISALPHA] (
<@Text, nvarchar(max),>)
Arguments
@Text
is the text to be evaluated. The @Text argument can be of data types that are implicitly convertible to nvarchar or ntext.
Return Type
bit
Remarks
ISALPHA searches for [a-z][A-Z] and returns 0 if other than those values are found.
Examples
select wct.ISALPHA('ABC');
This produces the following result.
| column 1 |
|---|
| 1 |
select wct.ISALPHA('abc54qwerty');
This produces the following result.
| column 1 |
|---|
| 0 |
select wct.ISALPHA('ABC!');
This produces the following result.
| column 1 |
|---|
| 0 |