G
Greg
Hi, I hope someone can help me here I have 3 very similar queries.
QryLeg1:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=1));
QryLeg2:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=2));
QryLeg3:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=3));
What I need to do is write an SQL statement that selects the lngAirportID
from each query with an outer? join on lngFlightPlanID. I need to define each
query within the final SQL statement. I really have no idea of the correct
syntax to use but I expect it would look something like:
SELECT qryLeg1.lngAirportID, qryLeg2.lngAirportID, qryLeg3.lngAirportID FROM
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=1) AS qryLeg1) etc...
Any help would be greatly appreciated. Thanks!
QryLeg1:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=1));
QryLeg2:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=2));
QryLeg3:
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=3));
What I need to do is write an SQL statement that selects the lngAirportID
from each query with an outer? join on lngFlightPlanID. I need to define each
query within the final SQL statement. I really have no idea of the correct
syntax to use but I expect it would look something like:
SELECT qryLeg1.lngAirportID, qryLeg2.lngAirportID, qryLeg3.lngAirportID FROM
SELECT lngFlightPlanID, lngAirportID
FROM AAFP_tbl_FlightPlanLeg
WHERE (((intLegNumber)=1) AS qryLeg1) etc...
Any help would be greatly appreciated. Thanks!