This is my query for selecting table from MAJ that exist in the table user. However, both tables have two different format numbers to compare.
Phone number which is notel in user have (-) symbol , eg:019-9910922 and phone number in MAJ doesn't have that symbol, eg:0199910922.
Is there any other ways or solution where I can compare phone numbers(notel) in correct way?
SELECT * FROM MAJ WHERE EXISTS ( select * from user B WHERE A.notel = B.notel) AND SUBSTR('notel', 7,5);