SELECT a.org,
a.id,
a.Name,
b.ordNum
FROM customers A,
orders B
WHERE a.org = 'JJJ'
AND a.org = b.org (+)
AND b.addr_type (+) = 'ST' -- <<<<<<<<<<<<<<<<< why do i need to add (+) here
AND a.cust_id = b.cust_id (+)
ORDER BY 2
I have a table with a list of customers (A) and a table called orders (B) that have orders the customers may have placed . The query i have above is supposed to give me the names of all customers and the order number IF there is an order linked to that customer.
My question is.. why do i need to add the (+) after b.addr_type to get all the customers even if they have not placed an order.