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 last published in July 2006

Dig Deeper on Oracle and SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close