Hello Gentlemen,
The question i am going to ask would probably a very simple one to you but it consumed a lot of my time. So, i decided to put it here seeking your help.
So, here is the problem i am facing.
I've 3 tables as follows
1 - Maintenance_Performed
Log_id,
Type_code,
Date_Performed,
Vehicle_id
2 - Next_Maintenance
Log_id,
Type_code,
Planned_date,
Vehicle_id
3 - Maintenance_types
Type_code,
Type_name
I am trying to fetch recods for a vehicle that which type of maintenance was performed and what type is planned for the vehicles.
1st and 2nd table's Type_code is the foreign key to 3rd table.
i need to present the record as follows
vehicle_id | Performed_Maintenance | Planned_Maintenance | Planned_Date
Problem arises when i join the maintenance_types table to fetch related Maintenance name.
May you please help me out in this matter and write this query for me.
Thanks a lot.