Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intelligent Filter

Status
Not open for further replies.

krisav

Programmer
May 29, 2003
4
0
0
US
I have a column 'Load_date' which is available in many tables and it becomes very important filter. My question is how do I create a filter that would be intelligent enough to include that many where clauses as many table in the from clauses. For example
if in From clause I have Table1, table2 (both have load_date as a column) then in the Where clause i need table1.load_date = some_value and table2.load_date = some_value.

I also know I can also achieve then same by having
table1.load_date = table2.load_date and
table1.load_date = some_value
but what I have seen is the earlier one runs faster that the later one if the tables are partitioned on Load_date.

-- Krishnan
 
create an attribute called load_date and make sure each table with the column shows up for this attribute.

any filter you create with this attribute will have the appropriate joins and where clauses
 
The joins are formed but it like as under
from table1 a11, table2 a12
where a11.load_date = a12.load_date
and a11.load_date = filter_value

but I want it to be
from table1 a11, table2 a12
where a12.load_date = Filter_value
and a11.load_date = filter_value

-- Krishnan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top