SorryButImaNewbie Posted April 2, 2015 Posted April 2, 2015 (edited) Hi! anyone with some oracle SQL experience? I want to join 2 tables, where the only possible join is by two different columns. Column A is a twelve character long number, while the other ( B ) is a two character long number. They can ba joined, because A is like .BB......... , So the 2. and 3. char is taken from B (and in no other cases this is possible). I think I should be able to use REGEXP_LIKE but how do I use column data in this function? '.column_name.........' isn't working naturaly. I tried to look around but I'm stuck now. The best would be if I can use the column name in the regex. I thought about manually entering the possible number combinations, but that wold require updates, and I can't allow that. Thank you for your time! Edited April 2, 2015 by SorryButImaNewbie
Solution SorryButImaNewbie Posted April 2, 2015 Author Solution Posted April 2, 2015 I found out that INNER JOIN with SUBSTR function is the way to go! All Hail die INTERNETZ!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now