I'm trying to do an OUTER-JOIN in progress using this page as inspiration. My code is as follows OPEN QUERY qMovto FOR EACH movto-estoq WHERE movto-estoq.lote BEGINS pc-lote AND movto-estoq.it-codigo BEGINS pc-it-codigo AND movto-estoq.dt-trans >= pd-data1 AND movto-estoq.dt-trans <= pd-data2 AND movto-estoq.cod-emitente = pi-cod-emitente, EACH item OUTER-JOIN WHERE movto-estoq.it-codigo = item.it-codigo, EACH item-cli OUTER-JOIN WHERE item-cli.item-do-cli BEGINS pc-item-cli AND movto-estoq.cod-emitente = item-cli.cod-emitente AND movto-estoq.it-codigo = item-cli.it-codigo AND movto-estoq.un = item-cli.unid-med-cli, EACH nota-fiscal OUTER-JOIN WHERE movto-estoq.nro-docto = nota-fiscal.nr-nota-fis BY movto-estoq.dt-trans DESCENDING BY movto-estoq.hr-trans DESCENDING. The problem that is happening is when 1 element in null, all the other elements that are in the OUTER-JOIN are appearing as null as well, even though they are not null. Is there a better way to write this code? Should I put 'LEFT' before the OUTER-JOIN? Thanks for your time. Continue reading...