mysql - Phone Number Conversion and Comparison -



mysql - Phone Number Conversion and Comparison -

i have 2 columns compare: first column residential number appears in format of (555) 555-5555, sec column appears in format of 5555555555.00. compare first 6 digits of each number in 3rd column displaying true if first 6 digits match , false if not. have query done, converting columns in same format killing me. help on this?

in mysql, quick solution this:

select col1, col2, case when left( replace(replace(replace(replace(col1, '(', ''), ')', ''), '-', ''), ' ', ''), 6) = left(col2,6) 'true' else 'false' end matches yourtable

please see fiddle.

mysql .net vb.net datagridview

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -