Is this SQL Possible??

  • From: "Ben Sauer" <SauerBL@xxxxxxxxxxxxx>
  • To: Oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 20 Dec 2004 12:11:27 -0700

I have a many to one relationship from table b to table a.   In other words,
in
table A I have people and in table B I have assignments.  I need to write a
query to pick up a set of users in table A and just one of their assignments.
I
don't even care which one.  Is there a way to do that elegantly?
 
I thought this would work... but it's just too time consuming.
 
SELECT *
  FROM ss,
       (SELECT "Support Staff ID", "Group ID"
          FROM gd WHERE "Full Name" IN (SELECT DISTINCT "Full Name"
                                          FROM gd))
 WHERE ss.code = "Support Staff ID"
Thanks,
Ben.

------------------------------------------------------------------------------
This message may contain confidential information, and is
intended only for the use of the individual(s) to whom it
is addressed.
------------------------------------------------------------------------------


--
//www.freelists.org/webpage/oracle-l

Other related posts: