Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS SQL syntax into Oracle??

Status
Not open for further replies.

danharman

Technical User
Apr 24, 2001
22
AU
Dear All,

Can anyone assist with writing the below query in syntax that Oracle will understand? I am having trouble with the cross join syntax....

Please excuse my ignorance, I am new to SQL!

** THANKS TO bperry FOR THE SOURCE SQL**

Select f2.flightno, COUNT(f2.flightno) as NumCities
From FLIGHT f2
cross join
(
Select fto ,flightno
From FLIGHT
Where flightno = 'EA31'
) f1
Where f2.flightno <> 'EA31' and f2.fto = f1.fto
Group by f2.flightno
Having COUNT(f2.flightno) =
(select count(flightno) from FLIGHT
where flightno = 'EA31')


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top