Folgende Query hat im Ergebnis product_uuid = null
.
Die Tabelle product_calc
hat auch das Feld product_uuid
.
SELECT * FROM lerp_get_product_list_all(?) AS listall LEFT JOIN product ON product.product_uuid = listall.product_uuid LEFT JOIN product_no ON product_no.product_no_uuid = product.product_no_uuid LEFT JOIN quantityunit ON quantityunit.quantityunit_uuid = product.quantityunit_uuid LEFT JOIN product_calc ON product_calc.product_uuid = listall.product_uuid -- can be null
Das passiert nicht wenn man den JOIN mit den NULL Werten an den Anfang stellt:
SELECT * FROM lerp_get_product_list_all(?) AS listall LEFT JOIN product_calc ON product_calc.product_uuid = listall.product_uuid -- can be null LEFT JOIN product ON product.product_uuid = listall.product_uuid LEFT JOIN product_no ON product_no.product_no_uuid = product.product_no_uuid LEFT JOIN quantityunit ON quantityunit.quantityunit_uuid = product.quantityunit_uuid