sql server - SQL mobile number validation -


i have sql database filter out valid mobile numbers.

i use follows;

where pn.phonenumber '+[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' or pn.phonenumber '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' or pn.phonenumber '[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' or pn.phonenumber '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]' 

however still receive numbers such 0000000, 0 ,0000 etc.
of numbers aren't irish mobiles either don't begin 08.
fix there if wanted beginning of number begin 087 input [0][8][7] instead of [0-9]?

try testing !

this'll give numbers starting 087 , mobile(length)=10

select * table mobile_number '087%' , len(mobile_number)=10 

demo


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -