Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a two tables which I would like to link. One table holds flights from a flight plan. The other table holds the performed flights.
Table Flightplan
Table Flights
In the flight plan table I can have multiple records for the same flight no, in case the times differ from one day to the other. How can I best link the flight record of that particular day (i.e. 8.3. was a Tuesday = Weekday 2) and hide the other two records for flight no 1081 for Friday and Saturday?
Should I load the flight plan 7 times with a day field and then create combined key? I'm a bit reluctant to multiply the table x 7.
plz share the sample data and explain your problem in detail...
From your sample, it looks, FlightNo is the common field through which you can link....
try like this?
FlightPlan:
Load *,
FlightNo
From FlightPlan;
Flight:
Load *,
FlightNo
From Flight;
You can rename if FlightNo is with differtent name in FlightPlan, like this?
FlightNumber as FlightNo
Split the TimeDep and TimeArr fields in separate date and time fields and give the new time fields the same names as in the flightplan table. That will create a synthetic key, which shouldn't be a problem, but if you want you can replace that with a key made from the three fields flightno, deptime and arrtime. Then drop those three fields from the table flights table so that table is linked with the flightplan table using only the new key field.
Link with FlightNo field it will work ....you will get exact result