Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2007, 05:54 PM
Registered User
 
Join Date: May 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default SELECT Query Difficulties

I'm trying to do a SELECT query to pull up values in one table (tblOne) that do not match any of those in a second table (tblTwo). The first table contains newly imported data with no key (with fields matching those of the database). The second table is a listing of allowable designations, each with a unique key. They are in a text format like this AA/BB, AB/BB, AC/CC, etc. The SQL i've been using is:

SELECT DISTINCT tblOne.Designation
FROM tblOne, tblTwo
WHERE ((tblOne.Designation)<>(tblTwo.Designation));

I can get a query working that matches records with common designations with no effort at all...but the same can't be said for the opposite (which is what I want). I can't get a query to spit out the records in tblOne with designations that do not match those listed in tblTwo. My goal is to use the query as a tool to list the designations that I need to add to tblTwo. Would anyone mind helping me out on this?
 
Old June 17th, 2007, 06:01 PM
Registered User
 
Join Date: Oct 2006
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

From what I have read, you are looking to records that exist in one table and not the other. If this is the case, use the unmatched query in Access. Go to queries, new and unmatched queries and then follow the wizard. This will provide you with everything in one tabler, but not the other. You can then manipulate this for yourself.

Hope this helps

Martin

 
Old June 17th, 2007, 06:02 PM
Registered User
 
Join Date: May 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can't believe I didn't try that straight-away. Thanks for the assist!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties getting WroxUnited and stuff set up Rusty0918 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 October 17th, 2007 11:14 PM
SELECT from SELECT query? seananderson Access 1 October 12th, 2007 12:40 AM
Access2003 Difficulties marclf Access VBA 0 October 31st, 2006 09:04 AM
Insert on server difficulties! fskilnik Dreamweaver (all versions) 4 August 22nd, 2005 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.