When I run the query it doesn't include all records from the tblVehicleSegment only those which are mached with tblTargetVehicle. What do I have to do to get all records from tblVehicleSegment? Thanks for you help.
SELECT tblVehicleSegment.SEGMENT, tblVehicleSegment.VEHICLE_CODE, tblVehicleSegment.QUALITY_GATE_F, tblVehicleSegment.QUALITY_GATE_E, tblVehicleSegment.QUALITY_GATE_D, tblVehicleSegment.QUALITY_GATE_C, tblTargetVehicle.REALIZED_QUALITY_GATE_F, tblTargetVehicle.REALIZED_QUALITY_GATE_E, tblTargetVehicle.REALIZED_QUALITY_GATE_D, tblTargetVehicle.REALIZED_QUALITY_GATE_C, tblTargetVehicle.GCS_ID
FROM tblTargetVehicle RIGHT JOIN tblVehicleSegment ON tblTargetVehicle.VEHICLE_CODE = tblVehicleSegment.VEHICLE_CODE
WHERE (((tblTargetVehicle.GCS_ID)=4));
SELECT tblVehicleSegment.SEGMENT, tblVehicleSegment.VEHICLE_CODE, tblVehicleSegment.QUALITY_GATE_F, tblVehicleSegment.QUALITY_GATE_E, tblVehicleSegment.QUALITY_GATE_D, tblVehicleSegment.QUALITY_GATE_C, tblTargetVehicle.REALIZED_QUALITY_GATE_F, tblTargetVehicle.REALIZED_QUALITY_GATE_E, tblTargetVehicle.REALIZED_QUALITY_GATE_D, tblTargetVehicle.REALIZED_QUALITY_GATE_C, tblTargetVehicle.GCS_ID
FROM tblTargetVehicle RIGHT JOIN tblVehicleSegment ON tblTargetVehicle.VEHICLE_CODE = tblVehicleSegment.VEHICLE_CODE
WHERE (((tblTargetVehicle.GCS_ID)=4));