|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need help with SQL
I have been programming for a long time, but I am a relative newbie with SQL.
I have two tables with transactions. One table contains ALL transactions, the second table is a subset of the first with only a specific set of transactions. The columns differ between the two tables, but there is enough relational information for me to match all of the subset transactions with the master transaction table. In some odd cases the subset transacation is inserted, but the corresponding entry is not added to the master transaction table. I need to write a query that shows which transactions in the subset table do not appear in the master table. Can someone help me with this? Thanks, Eric |
|
#2
|
||||
|
||||
|
Code:
SELECT * FROM Subset Table WHERE FieldName1 NOT IN ( SELECT DISTINCT FieldName1 FROM Master Table ) |
|
#3
|
|||
|
|||
|
almost on the first try ...
My dialect of SQL did not like NOT IN, but NOT EXISTS worked just fine.
Thanks for your help ... E Quote:
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Need help with SQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|