2 fields from the same table

Nenya

Registered User.
Local time
Today, 16:58
Joined
Jul 4, 2003
Messages
20
I have one table containing locations, and one table containing activities. Each activity has a location (as part of a composed primary key) and might have a subscription location.

The activity table contains only the ids of locations, and i'm using a query to get both names.

I don't know how to get the name for the second location... Anyone can help me?:confused:
 
Sounds like you need to have the Location table in the query twice. In the query window, assuming your Activity and Location tables have a normal 'inner' join, add the Location table in again (it will be called Location1).

Create a join from the subscription location field in the Activity table to the ID field in the Location1 table. Right-Click on the join and select option 2 or 3 (whichever gives you all records from Activity and those that match from Location1).

HTH.

Matt.
 

Users who are viewing this thread

Back
Top Bottom