Please suggest query for following situation -
05-19-2004
, 07:09 AM
I have the following situation
There are 2 tables
table 1 contains
airliens
airlines zone
airlines airports
Where airlines has its own zones,and each zone has multiple airports.
table 2 contains
airlines
agent
airport code
service type
weight slabs
market / contract
buying rate
for each airline,agent,airport,service type,weightslab,market /
contract there is onebuying rate
so now if we consider data intable 2 as
1,1,1,1,10,M,100
1,1,2,1,10,M,100
1,1,3,1,10,M,150
1,1,10,1,10,M,200
1,1,20,1,10,M,300
and data in table 1 is
1,100,1 }
1,100, 2 } --- Airlines Zone 100
1,100,3 }
1,200,4 }--|
1,200,5 }--| Airlines Zone 200
now i want to write a single query so that my result set is
1,1,100,10,M,100/150
1,1,200,10,M,200/300
ie for each airlines instead of getting data for individual airports i
want to have data single record for airlines zone (100/150,200/300
indicates that rate that it retrieves could be any oneof them)
Please treat is as urgent.
Regards,
Dewang Bhansali |