Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Simple How To: SQL left Join with and clause
Hello there
I try to rewrite an Access queries for Oracle 8. Now I get in touch with 'LEFT JOIN' and need there some little hint how to do that.
simple SQL problem:
clients, which some of them haves orders. Now I would like to have all
clients which have either no orders or orders which have a total price
less than 10$
(something like this, is not so important...)
SELECT * FROM client LEFT JOIN order ON (client.id = order.clientid and order.price < 10.0)
I have an and clause in my LEFT JOIN. How would this be look like in oracle ?
SELECT * FROM client, order WEHER client.id = order.clientid(+) and order.price < 10.0
is not working because in this case I loose clients which have no
orders
so any ideas how to realize that ?
thank you for your time.
regards
Mark
Received on Tue Feb 24 2004 - 02:24:30 CST
![]() |
![]() |