If you want to check if phone numbers are in the format (nnn) (nnnn), where in the first part there should be 3 numbers and in the second part there should be 4 numbers, you can do this:
if @Phoneno like '([0-9][0-9][0-9])([0-9][0-9][0-9][0-9])'
print 'ok'
else
print 'not ok'
An insignificant thing with the ISNUMERIC method is the decimal sign and minus sign. This can be eliminated by replacing these characters with a blank one (but still will not check the correct length).
source
share