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 -> Help rewriting query

Help rewriting query

From: News <Contact_404_at_hotmail.com>
Date: 15 Nov 2005 04:12:30 -0800
Message-ID: <1132056750.173176.100990@g44g2000cwa.googlegroups.com>


Could anyone help with rewriting queries below that are equivalent to avoid self-join or subquery in the second query so the materialized view fast refresh would be possible ?

SELECT *
FROM t1 tab1, t1 tab2, t3 tab3
WHERE tab3.c31 = tab1.c11
and tab3.c32 = tab2.c12;

SELECT *
  FROM (t3 inner JOIN t1 ON t3.c31 = t1.c11) inner JOIN t1 tab2 ON t3.c32 = tab2.c12;

If it's not possible, any solution other than duplicate tables ? Received on Tue Nov 15 2005 - 06:12:30 CST

Original text of this message

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