That will work – but join performance on expression and hence non-indexed data is going to stink. You could create virtual columns in Oracle (see my blog on
toad world) then index the virtual columns – this is allowed but little known – then join on virtual columns. That should give decent performance …
From: reedda [mailto:bounce-reedda@toadworld.com]
Sent: Wednesday, July 31, 2013 9:01 AM
To: oracle@toadworld.com
Subject: RE: [Toad World - Oracle Discussion Forum] Extracting words from multiple columns
RE: Extracting words from multiple columns
Reply by reedda
Beth:
I think you need to use the country field in your country table and INSTR on each of the four columns ORed together as a means of joining the two tables to get your results.
Hope this helps,
Dave
From: bethmccann [mailto:bounce-bethmccann@toadworld.com]
Sent: Wednesday, July 31, 2013 8:24 AM
To: oracle@toadworld.com
Subject: [Toad World - Oracle Discussion Forum] Extracting words from multiple columns
Extracting
words from multiple columns
Thread created by bethmccann
Hi, I have two tables that I need to join to enable me to add a country code to a list of addresses. I’m trying to search through 4 columns to find a country to match against the country table.
table1
column1,column2,column3,column4 all contain address fields where the country could be the whole column or part of:
row1
23 HIGH ST, SOMEWHERE, FREETOWN, XX1 2XX
row2
HAPPY HOME, 17 HIGH ST, SOMEWHERE, ANYWHERE FREETOWN
table2
column1,column2
row1
FREETOWN,FT
So a simple join between column 3 of table 1 and column 1 of table 2 would return FT for row1, but would not find a result for row2.
I’d quite like a simple way of searching the column (or a combination of columns) for a match to another table, especially when the columns can contain many different words.
Is this even possible?
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Oracle notifications altogether.
Toad World - Oracle Discussion Forum
Flag
this post as spam/abuse.

To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Oracle notifications altogether.
Toad World - Oracle Discussion Forum
Flag
this post as spam/abuse.
