Ask the Expert

Can't convert query to 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?

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

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: