sql_language thread: I'm stumped... tough JOIN...
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1B42C.DF745B70
Content-Type: text/plain;
charset="iso-8859-1"
Try this:
SELECT SUM(P.PO_TOTAL) AS PO_TOTAL,
SUM(E.EO_AMOUNT) AS EO_TOTAL,
SUM(E.EO_AMOUNT + P.PO_TOTAL) as COMBINED_TOTAL,
V.VENDOR_NAME, P.VENDOR_NUMBER, E.VENDOR_NUMBER
FROM Vendors V
LEFT OUTER JOIN vwEOTotals E ON
E.VENDOR_NUMBER = V.VENDOR_NUMBER
LEFT OUTER JOIN vwPOTotals P ON
P.VENDOR_NUMBER = V.VENDOR_NUMBER
GROUP BY V.VENDOR_NAME, P.VENDOR_NUMBER, E.VENDOR_NUMBER
If this doesn't get you there, let me know I and will write something with
sub queries.
regards
David Cameron
nOw.b2b
dcameron@i...