Consultor Eletrônico



Kbase P10995: What would the SELECT statement look like for a three table join in SQL-92 where the joins are left
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

GOAL:

What would the SELECT statement look like for a three table join in SQL-92 where the joins are left outer joins?

FACT(s) (Environment):

Progress 9.1x

FIX:

The SQL SELECT statement that would be needed to do a three table join where each table does a left outer join is as follows:

SELECT A.CustNum, B.CustNum, B.OrderNum, C.OrderNum, C.Price, C.ExtendedPrice
   FROM PUB.Customer AS A, PUB.Order AS B, PUB.OrderLine AS C
   WHERE A.CustNum = B.CustNum (+) AND B.OrderNum = C.OrderNum (+)
   ORDER BY A.CustNum, B.OrderNum