I am working in Oracle environment. I need to build query that would search through badly formatted telephone data. So far I got :
select * from guest_db
REPLACE(REPLACE(REGEXP_REPLACE(TEL1, '[[:space:]]*',''),'+',NULL),')',NULL),'(',NULL
LIKE '%
REPLACE(REPLACE(REPLACE(REXEXP_REPLACE('(0)1111 111111','[[:space:]]*',''),'+',NULL),')',NULL)'(',NULL)
||%';
difficulty is putting second nested replace(replace function between '% %' signs without turning them into strings. If I build this function without those percentage signs LIKE function behaves like equal sign. It spits back only exact match ( obviously without special characters like ),(, +, , )... Any help greatly appreciated.