Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 29th, 2004, 06:03 PM
Authorized User
 
Join Date: Jun 2003
Location: Marikina, , Philippines.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rylemer Send a message via MSN to rylemer Send a message via Yahoo to rylemer
Default INNER JOIN Not EQUAL

I have 2 Tables both are have the same structured.
let say
Table 1 Table 2
FName FNAMe
MNAme MNAme
LNAMe LNAMe

I want to see all Match records from Table2 to Table1

Ok I used Inner Join on FNAME = FNAMe... etc..
I got the correct Results.

Now the problem is I want to get all records that are not matched from both tables.
What queries should I Use?

Appreciate all your help

Thanks,
ELmer
Reply With Quote
  #2 (permalink)  
Old March 29th, 2004, 08:35 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try this:

SELECT Table2.FName
FROM Table2
WHERE (((Table2.FName) Not In (SELECT Table1.FName FROM Table1 INNER JOIN Table2 ON Table1.FName = Table2.FName)))
Union
SELECT Table1.FName
FROM Table1
WHERE (((Table1.FName) Not In (SELECT Table1.FName FROM Table1 INNER JOIN Table2 ON Table1.FName = Table2.FName)));

There may be an easyer way

Reply With Quote
  #3 (permalink)  
Old March 30th, 2004, 01:01 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

You may want to try using the Find Unmatched query wizard. Just select the table that has records that do not match those in the other table

Quote:
quote:Originally posted by JimYellow
 Try this:

SELECT Table2.FName
FROM Table2
WHERE (((Table2.FName) Not In (SELECT Table1.FName FROM Table1 INNER JOIN Table2 ON Table1.FName = Table2.FName)))
Union
SELECT Table1.FName
FROM Table1
WHERE (((Table1.FName) Not In (SELECT Table1.FName FROM Table1 INNER JOIN Table2 ON Table1.FName = Table2.FName)));

There may be an easyer way

Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"
Reply With Quote
  #4 (permalink)  
Old May 8th, 2017, 01:35 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default INNER JOIN Not EQUAL

Instead of this you can use this method:


SELECT * FROM table1 LEFT JOIN table2 ON table2.number = table1.number WHERE table2.number is NULL OR table1.number is NULL


It works ...
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's behind the 'Equal' and 'LinkedList' buttons Everard Hughes BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 1 September 27th, 2008 08:44 AM
~* Total pages are not equal *~ chakravarthy_vr Reporting Services 2 October 13th, 2006 03:56 PM
Oracle 8i inner join and left join problem puteri_84 Oracle 2 August 19th, 2004 07:14 AM
Multiple Not Equal rylemer Access 5 January 23rd, 2004 04:59 PM
How to "Set" a function equal to a DataReader DittoToo ASP.NET 1.0 and 1.1 Basics 1 July 1st, 2003 10:15 AM



All times are GMT -4. The time now is 11:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.