then its not correct, the table that you have shown is correct, but the values will remain same even if the vehicle is changed, how can you change vehicle type in sub query during execution
Code:
identification_code repair_schedule type_of_vehicle part_no qty_to_use available_qty Earmarked
b001 2015 bike1 abc-111 2 20 4
b001 2015 bike1 abc-112 3 30 6
b001 2015 bike1 abc-113 1 10 2
Code:
identification_code repair_schedule type_of_vehicle part_no qty_to_use available_qty Earmarked
b003 2014 bike2 xyz-001 2 21 0
b003 2014 bike2 xyz-002 1 11 0