Q

Can't convert query to subquery

I have three tables. I want to extract FDATE, OBS.STATION, FCT.VALUE and OBS.VALUE. I was able to do that with this query, but unable to convert it to a subquery.

I have three tables:
FCT: FDATE, X, Y , VALUE
BOS: DATE, STATION, VALUE
GRID_POINT: X,Y, STATION
I want to extract FDATE, OBS.STATION, FCT.VALUE and OBS.VALUE. I was able to do that with this query.
SELECT OBS.STATION,FDATE,FCT.VALUE ,OBS.VALUE FROM
FCT,OBS,GRIDSELECT OBS.STATION,FDATE,FCT.VALUE,OBS.VALUE FROM
FCT,OBS,GRID WHRE
FDATE=DATE AND FCT.X=GRID_POINT.X AND FCT.Y=GRID_POINT.Y 
AND OBS.STATION=GRID_POINT.STATION
but I was not able to convert it to a subquery. Can you help me with that?
A simple join of the three tables will give you the results you want, and I doubt that using subqueries would be any faster. Is there a particular reason why you want to use that approach?
This was first published in July 2006

Dig deeper on Oracle and SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close