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 -> Urgent Help Needed - Newbie Q on a simple SQL Query

Urgent Help Needed - Newbie Q on a simple SQL Query

From: THoR <thor808808_at_yahoo.com>
Date: 26 Apr 2002 06:06:41 -0700
Message-ID: <372e33ea.0204260506.3fa39293@posting.google.com>


Hello all,

I need some help to work out the Flight Numbers of any flights that travel to ALL the same destinations as XX

I have managed to list the Flight Numbers(BELOW) of the flights which travel to ANY of the DESTINATIONS as XX - that was easy ;)

How do I work out in SQL the query for Flight Numbers that travel to ALL the same ones as XX does ??

[ie: If XX travels to A, B ,C - I need to work out which other flights travel to ALL 3(A & B & C) and not just A or B]



SELECT Flight.destination, Flight.flightno FROM Flight
WHERE Flight.destination in
(SELECT Flight.destination
FROM Flight
WHERE Flight.flightno = 'XX')

Kind Regards

Thomas Ross Received on Fri Apr 26 2002 - 08:06:41 CDT

Original text of this message

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