query data

  • Thread starter jefferysf via AccessMonster.com
  • Start date
J

jefferysf via AccessMonster.com

Hi. I am building an aviation database. I am want to create a flight
summary query that shows only
Carrier
Date of Flight
Origin
Destination
Miles
Flight Hours

However, my result is a line for each passenger - for example If there were
three passengers on one flight i am getting 3 lines with 3 x the miles and 3
x the hours. How do I return only one line per flight.

Also, I want to be able to show flight details with all passenger names for
each flight. Is a subreport the answer there?

Thanks,
JF
 
S

Smartin

jefferysf said:
Hi. I am building an aviation database. I am want to create a flight
summary query that shows only
Carrier
Date of Flight
Origin
Destination
Miles
Flight Hours

However, my result is a line for each passenger - for example If there were
three passengers on one flight i am getting 3 lines with 3 x the miles and 3
x the hours. How do I return only one line per flight.

Also, I want to be able to show flight details with all passenger names for
each flight. Is a subreport the answer there?

Thanks,
JF

Hello,

Do you perchance have all your data (passengers & flights) in one table?
If so, this is making your life more difficult. For a quick fix, you
could modify your query to return DISTINCT results by opening the query
properties and changing the "unique values" property to Yes.

For your second question, and again assuming all the data is in one
table, I think you could just add passenger fields to the query you posted.

If you /do/ have your data organized as I surmise, you will probably
encounter more conundrums because your data is not "normalized". There
is much discussion here and on the web regarding "relational database
design" and "normal form", but feel free to ask if you need assistance
regarding the whys and wherefores of this concept.

Hoping this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

LIKE function match values 2
do i need six tables, or one? 3
calculation in a table 1
Print a Name Badge 0
Running a report to print a name badge 0
Unique Query 7
count "0" cells 4
Conditional Expression 10

Top