Re: Is this SQL Possible??

  • From: "Juan Carlos Reyes Pacheco" <jreyes@xxxxxxxxxxxxxxxx>
  • To: <SauerBL@xxxxxxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 20 Dec 2004 15:53:47 -0400

I suppose is a mistake you are saying gd is in both querys
FROM gd WHERE "Full Name" IN 
&
(SELECT DISTINCT "Full Name"  FROM gd

If is true both tables gd are the same

You could
do the following
( if you get all data at the same time)

SELECT *
FROM ss,
(SELECT "Support Staff ID", "Group ID"
FROM gd )
WHERE ss.code = "Support Staff ID" 
 

If you want to get faster the first recods take of the subquery

SELECT gd."Support Staff ID", gd."Group ID"
FROM ss, gd
WHERE ss.code = gd."Support Staff ID" 

Juan Carlos Reyes Pacheco
OCP
--
//www.freelists.org/webpage/oracle-l

Other related posts: