Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
spowell
Starting Member
23 Posts |
Posted - 2010-07-28 : 19:12:51
|
I have a table which has got a lot of phonenumbers in. The problem I have is that it also has a lot of incorrect phonenumbers as well. All the phone numbers I want from the table are either 10 or 11 digits long so is there a select query that would just return the rows that had either a 10 or 11 digit number in them?eg01225111222016771112221011231230456111222would return results of 012251112220456111222Thanks for reading |
|
singularity
Posting Yak Master
153 Posts |
Posted - 2010-07-28 : 20:21:00
|
select phonefrom yourtablewhere len(phone) between 10 and 11 |
|
|
spowell
Starting Member
23 Posts |
Posted - 2010-07-29 : 04:53:45
|
Thanks a lot for your help |
|
|
|
|
|