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 -> Re: Return 1 row from joined table

Re: Return 1 row from joined table

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 23 Dec 2004 11:39:08 -0800
Message-ID: <1103830748.938126.16370@z14g2000cwz.googlegroups.com>


What is different about the rows? Using something like rownum=1 is a kludge. It means you haven't identified all the conditions that are unique to the solution set.

As a first pass, try removing the rownum condition, add a count(*) to the select clause and the appropriate group by clause. If the counts are all 1 then you never needed any other condition in the first place. If they are not, you neee to think about what conditions you are missing.

HTH
  ed Received on Thu Dec 23 2004 - 13:39:08 CST

Original text of this message

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