Select rows for values in one table but no in another
Hi there,
I have 2 tables transactions and dealer. for each record in the transaction tbale (i.e. for each transaction created) there is a dealer_code (dealer_code being the primary key of dealer table where details of all dealers are kept) assigned to it. I want to get a list of all dealers that are in the dealer table but not in the transactions table for the month of June. I have used the following but it doesnt work! Help!
Select dealer.DEALER_CODE, dealer.DEALER
From dealer , transactions
Where month(transactions.TRANSACTION_CREATED) = 6 AND dealer.DEALER_CODE <> transactions.DEALER_CODE
This gives me all the dealers in the dealer table and not those not found in the transactions table.
Subject
Views
Written By
Posted
Select rows for values in one table but no in another
7179
June 14, 2005 10:12AM
3364
June 14, 2005 10:25AM
4272
June 15, 2005 03:25AM
2929
June 15, 2005 07:13AM
2957
April 19, 2008 08:52PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.