Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> compare two function based columns in two tables

compare two function based columns in two tables

From: Dave Rawding <dave_at_cybergrants.com>
Date: 22 Apr 2003 07:08:01 -0700
Message-ID: <95e852af.0304220608.1f7b3a8a@posting.google.com>


Hi,

I am trying to see if table B's varchar2 column_1 is contained in table A's varchar2 column_1. The comparison uses a function to get the string 'into shape'. So the test is either:

... where instr(function(a.column_1),function(b.column_1)) > 0

or

... where function(a.column_1) like '%'||function(b.column_1)||'%'

I have created function based indexes on each table for the function, and then analyzed compute statistics the tables, but so far the functions are not being used.

When I create a 'shadow' column (using triggers to maintain it) in each table of the function(column_1) and use these columns in the first method above, response is acceptable.

What I can't tell is if I should be expecting the same response using function based indexes if I just get the syntax and all correct.

Dave Received on Tue Apr 22 2003 - 09:08:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US