dbTalk Databases Forums  

Multiple Fields, Similar Data

comp.databases.ms-access comp.databases.ms-access


Discuss Multiple Fields, Similar Data in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PPT33R
 
Posts: n/a

Default Multiple Fields, Similar Data - 01-04-2005 , 02:37 PM






The MS Access website is very unhelpful on this topic, and I cannot
find anything in my Googling to find a hint.

I am working with very large, existing data sets that consist of
multiple fields. Two of the fields are "Origin" and "Destination".
These fields contain the FAA Airport Codes, so the data is similar. I
also have another table with all FAA Airport Codes, corresponding FAA
Airport Categories, and Airport Names.

I need to establish the relationship between the main air travel table
and the airport table. Both the "Origin" and "Destination" must relate
to the FAA Airport Code table. However, when I establish this
relationship and examine the FAA Airport Code table, I get the
equivalent of an "and" function. In other words, the only records in
the subtables are those flights that both originated and terminated at
the SAME airport (aka "sightseeing" flights...) What I need is the
records of ALL flights that EITHER originated OR terminated at the
specified Airport.

All the Microshaft website says is "don't do that".
I am a novice, and any clue would be helpful.

TIA


Reply With Quote
  #2  
Old   
Jerry Porter
 
Posts: n/a

Default Re: Multiple Fields, Similar Data - 01-04-2005 , 04:32 PM






If I understand your application correctly, you need to link to two
separate instances of the codes table. In your query, add a separate
instance of that table. Then link the travel table to the first
instance by the origin code, and to the second one by the destination
code. Then you can create an OR filter using the fields from the two
copies of the codes table.


Reply With Quote
  #3  
Old   
Bob Quintal
 
Posts: n/a

Default Re: Multiple Fields, Similar Data - 01-04-2005 , 05:02 PM



"PPT33R" <mtmueller (AT) usa (DOT) com> wrote in
news:1104871077.335483.133000 (AT) z14g2000cwz (DOT) googlegroups.com:

Quote:
The MS Access website is very unhelpful on this topic, and I
cannot find anything in my Googling to find a hint.

I am working with very large, existing data sets that consist
of multiple fields. Two of the fields are "Origin" and
"Destination". These fields contain the FAA Airport Codes, so
the data is similar. I also have another table with all FAA
Airport Codes, corresponding FAA Airport Categories, and
Airport Names.

I need to establish the relationship between the main air
travel table and the airport table. Both the "Origin" and
"Destination" must relate to the FAA Airport Code table.
However, when I establish this relationship and examine the
FAA Airport Code table, I get the equivalent of an "and"
function. In other words, the only records in the subtables
are those flights that both originated and terminated at the
SAME airport (aka "sightseeing" flights...) What I need is the
records of ALL flights that EITHER originated OR terminated at
the specified Airport.

All the Microshaft website says is "don't do that".
I am a novice, and any clue would be helpful.

TIA

I don't know how you are trying to build your joins, but if using
the query builder, try this.

open a new query in design mode. Add the travel table. Add the
airport table twice. Link the link between the Origin field to
one of the two airport tables. Link the Destination field to the
other airoport table.


--
Bob Quintal

PA is y I've altered my email address.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.