declare @phone varchar(10) set @phone='01234567891' if @phone like '%[^0-9{1,9}]%' print 'Y' else print 'N'
declare @vchar varchar(50) set @vchar ='0124667891'; select case when @vchar not like '%[^0-9]%' then 'Number' else 'Not a Number' end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)