If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Where Not Exists
Great. Glad you got this to work.
There is usually more than one way to get the desired results. John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County Sue Compelling wrote: Hi John Thanks for your efforts - I managed to find a similar post and John Vinson recommended the Query Wizard - "Unmatched Records" - this was perfect for what I wanted. I couldn't get the right join to work when I was doing it myself because I wasn't putting null in the criteria for the "not wanted records". Cheers |
#12
|
|||
|
|||
Where Not Exists
John Spencer wrote:
Great. Glad you got this to work. There is usually more than one way to get the desired results. FWIW, I try to NEVER use IN/NOT IN with large datasets. Performance is *awful*. You're much better off learning how to do outer joins and using indexed columns in the join. SELECT * FROM tableA LEFT JOIN tableB ON tableA.PrimaryKeyField = tableB. ForeignKeyField WHERE tableB.ForeignKeyField IS NULL -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...eries/200912/1 |
|
Thread Tools | |
Display Modes | |
|
|