query- airlines

R

rekha

Hello,

These are the 3 tables AND THE FEILDS that I have:
1. Airline - AIRLINE ID, AIRLINE NAME
2. Destination - DESTID,DESTCODE,DESTNAME,AIRLINEID
3. Rate - AIRLINEI ID,AL NAME,DEST CODE, CATG1, CATG2, CATG3.....CAT6, CATGID

I am able to accept destination from the user and display records based on
the accepted dest:
ex: when user enters JFK, all records pertaining to that destination is
displayed.

The problem is here:
I want to accept weight or category from user, based on the weight /
category, records with all details needs to be displayed but all the rates
stored under catg1, catg2..catg6 should not be displayed.

When the user inputs 1 for category, then only rate stored under catg1 for
this particular dest should be displayed similarly when user enters 5, rate
under catg5 should be displayed and not all the rates.

The above query should work along with the dest query..

can you help pls?

Tks/Rekha
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The table Rate is not correctly Normalized. You should factor out the
Categories into another table, like this:

Categories
==========
CatGID Autonumber ? PK -> FK on table Rate.CatGID
Type Numeric (1 thru 6 - increase as you like)
Category Text Category name

To get a specific category type - something like this:

SELECT ... etc.
WHERE Categories.Type = 6 ... other criteria ...

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQWBalIechKqOuFEgEQIQZACgvIwCj7A7y6sbJArSmmdTfNbFxOAAnidu
b9gKx6XlskNbsnGrnYBV59/f
=1w/i
-----END PGP SIGNATURE-----
 

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

Top