General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only