I am trying to join two oracle database tables where the columns to join on contain slightly different data.
For example Table A has a column 'ref' and Table B has a column 'id'.
A.ref contains data like A1234567890B and B.id contains data of the form 1234567890
I have tried joining the two based on the following query;
SELECT * FROM A INNER JOIN B
ON SUBSTR(A.ref, 2,10) = B.id;
But this has returned no results when I know that there is matching data from this substring.
Any ideas?