[thelist] MS Table Join Question (from Excel)
Luther, Ron
Ron.Luther at hp.com
Mon May 9 13:04:02 CDT 2011
Hi Gang,
I have a simple (custom) query hitting an MS SS7 backend. It's a four table join that looks kinda like this:
Select a buncha junk
FROM Table_1 AL1, Table_2 AL2, table_3 AL3, Customer AL4 WHERE
(AL1.PART=AL2.Sku AND AL1.Code=AL3.CODE AND AL4.CUSTOMER_NUMBER=AL1.CUSTOMER_NUMBER)
AND (other conditions)
The problem is that this AL4 customer reference table may not be complete ... so I need a leftjoin/rightjoin on that last bit in the where clause to pull in all records from table AL1 regardless of whether they match up in AL4 or not.
Can I buy a clue on the syntax?
I've tried:
* right join on AL4.CUSTOMER_NUMBER=AL1.CUSTOMER_NUMBER)
* RIGHT JOIN ON AL4.CUSTOMER_NUMBER=AL1.CUSTOMER_NUMBER)
* AL4.CUSTOMER_NUMBER+=AL1.CUSTOMER_NUMBER)
* AL4.CUSTOMER_NUMBER(+)=AL1.CUSTOMER_NUMBER)
But none of those worked.
;-(
Thanks,
RonL.
More information about the thelist
mailing list