Skip to content
Advertisement

SQL query to return only 11 digit numeric values [closed]

Actual data:

Required data:

Advertisement

Answer

One method is:

That is, the value has no non-digits and is 11 digits long.

Another method is:

That is, when converted to a numeric, the range suggests that it is 11 digits.

And a third method is:

SQL Server supports character classes with like, so you can just like [0-9] 11 times.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement