Question Trip origin and destiny

laqa

Registered User.
Local time
Today, 20:29
Joined
Nov 2, 2002
Messages
10
I want to create a travel table with 2 foreign keys to the same table of airports, one as FROM_ID and other as TO_ID. Access lets me do that, but I am having trouble with the Query to list travel with origin and destiny. Database is attached.

Thanks again,

Luis.
 

Attachments

Open a new query in design view and in sql view delete the existing sql statement and paste in the following statement. Then run it and see if it works.

Code:
SELECT VIAGEM.ID_VIAGEM, ORIGEMDESTINO.Descr AS Origin, ORIGEMDESTINO_1.Descr AS Dest
FROM ORIGEMDESTINO AS ORIGEMDESTINO_1 RIGHT JOIN (ORIGEMDESTINO RIGHT JOIN VIAGEM ON ORIGEMDESTINO.ID_ORIGEM_DESTINO = VIAGEM.ID_ORIGEM) ON ORIGEMDESTINO_1.ID_ORIGEM_DESTINO = VIAGEM.ID_DESTINO;
 
Great, thanks a lot.
 
Cool - Glad to help. Have a good weekend :)
 

Users who are viewing this thread

Back
Top Bottom