This outer join thingy...
Posted in 1995
} } Is it fair to say that the confusion over this originates from the } fact that some people feel that the following query: } } select customer.cust_name, customer.state_code } from customer, outer state } where customer.state_code = state.state_code } and state.state_code != 'NY' } } ought to mean this (and I realise that this isn't a valid syntax, but to me } at least it is clear what it means): } } select customer.cust_name, customer.state_code } from customer, outer ( state where state.state_code != 'NY' ) } where customer.state_code = state.state_code Sounds like this one would retrieve all of the customers. If they have a state that isn't NY it'll also get the state? } } whereas other feel that it ought to mean this (also not valid syntax): } } ( select cust_name, state_code } from customer, outer state } where customer.state_code = state.state_code ) } where state_code != 'NY' } And this one would retrieve all of the customers who are not in the state of NY OR whose state is unknown? j. (just trying to understand) _____________________________________________________________________________ Jack Parker - Hewlett Packard, BSMC Boise, Idaho, USA jparker@hpbs3645.boi.hp.com _____________________________________________________________________________ "A thing is bigger for being shared" - Gaelic _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________