Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
5 Tables left out join problem
Hello
I have 4 tables with data (cRpt011, cRpt012,cRpt013, cRpt014) that should match with Operation table. (aging report)
I have the following select:
SELECT operation.CODE, operation.description, cRpt011.*, cRpt012.*,;
cRpt013.*, cRpt014.*;
FROM operation LEFT OUTER JOIN cRpt011;
LEFT OUTER JOIN cRpt012;
LEFT OUTER JOIN cRpt013;
LEFT OUTER JOIN cRpt014 ;
ON operation.CODE = cRpt014.operation4 ;
ON operation.CODE = cRpt013.operation3 ;
ON operation.CODE = cRpt012.operation2 ;
ON operation.CODE = cRpt011.operation1;
ORDER BY 1;
INTO CURSOR cLast
I am expecting to Left join Operation table with (cRpt011, cRpt012,cRpt013, cRpt014) but I am getting the result for one left join only.
What did I miss???
By the way, I can get the result I need by using 3 seperate SQL with left join (one to one) BUT 1 SQL should do work, right??
Thanks
Mo
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement