Mệnh đề where của bạn đang chuyển đổi phép nối bên ngoài trở lại thành phép nối bên trong.
Các hàng không phù hợp được lưu giữ bởi outer join tất cả sẽ có NULL các giá trị cho documentation.status vì vậy documentation.status != 3 của bạn điều kiện sẽ lọc lại những thứ này (Kết quả của biểu thức NULL !=3 unknown không phải true ).
Để tránh vấn đề này, hãy sử dụng
select documentation_reference.ref_docnumber,
documentation.filename
from documentation_reference
left outer join documentation
on ref_docnumber = documentation.docnumber
and documentation.status != 3
where documentation_reference.docnumber = 'TP-036'
Lưu ý rằng documentation.status != 3 vị từ được chuyển vào JOIN điều kiện.