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 -> Need hint: messy SQL query problem

Need hint: messy SQL query problem

From: Roger Loeb <rloeb_at_martech.com>
Date: Fri, 8 May 1998 13:33:22 -0600
Message-ID: <6ivmm3$him$1@news1.rmi.net>


I need some suggestions about how to approach a specific query problem. Simplified, I have two tables: A and B. "A" has a non-unique key that is indexed. "B" is indexed on the same key and is a subset of "A," i.e., anything in B is also in A at least once.

I need to group A in a certain manner, then select one row from the group (using MAX()), but only if none of the rows in the group have a corresponding row in table B.

I know there's a straightforward way to do this, and I'm sure I've done it before, but I'm blocking on the approach.

Got a hint???

Rog

--
roger@_delete_this_to_reply_.martech.com Received on Fri May 08 1998 - 14:33:22 CDT

Original text of this message

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