SQL LIKE Statement with Spaces -


spaces in phone numbers causing issues when trying search.

select * customers number '%02722231%'

this return records that're '02722231', not return records contain space e.g. '027 22231'

can done regular expressions? need search 0272542155 , records same including 027 2542155

try this:

select * customers replace(number, ' ', '') '%02722231%' 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -