473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Compare identical table structures for different values

7
Hi,

Is there any way to compare two identical table structures in access for different values in them.
EG:
Table 1:
Name occupation
rob plumber

Table 2:
Name occupation
rob builder

Is there any way this can be done in a query ?
Also how can a select query be written in vba for say table one in the above example?
Jun 26 '07 #1
3 3211
ADezii
8,834 Expert 8TB
Hi,

Is there any way to compare two identical table structures in access for different values in them.
EG:
Table 1:
Name occupation
rob plumber

Table 2:
Name occupation
rob builder

Is there any way this can be done in a query ?
Also how can a select query be written in vba for say table one in the above example?
The following SQL Statement will return the Name, Occupation in Table 1, and all Occupations in Table 2 that do not match the Occupation in Table 1 for the same individual. Is this what you want?
Expand|Select|Wrap|Line Numbers
  1. SELECT [Table 1].Name, [Table 1].Occupation, [Table 2].Occupation
  2. FROM [Table 1] INNER JOIN [Table 2] ON [Table 1].Name = [Table 2].Name
  3. WHERE [Table 2].Occupation<>[Table 1].[Occupation];
Jun 26 '07 #2
ago
7
The following SQL Statement will return the Name, Occupation in Table 1, and all Occupations in Table 2 that do not match the Occupation in Table 1 for the same individual. Is this what you want?
Expand|Select|Wrap|Line Numbers
  1. SELECT [Table 1].Name, [Table 1].Occupation, [Table 2].Occupation
  2. FROM [Table 1] INNER JOIN [Table 2] ON [Table 1].Name = [Table 2].Name
  3. WHERE [Table 2].Occupation<>[Table 1].[Occupation];
Yes. This does work fine. Just to add to it if I use <>Nz it will also compare the fields that are null right ?
Jul 26 '07 #3
missinglinq
3,532 Expert 2GB
I've changed the title of your post to make the subject matter clearer to members on the forum now, as well as people who may use the Search function in the future researching similar problems. Since you are a new member of the forum, please take the time to read the Posting Guidelines, paying particular attention to the section "Give a clear title to your question."

(POSTING GUIDELINES: Please read carefully before posting to a forum)

Welcome to TheScripts!

Linq ;0)>
Jul 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: GitarJake | last post by:
Hello all, I am new to sql and have some Access experience. In sql, how do I: compare 2 identical tables, (except for data); then update table 1 with new data from table 2 TIA Jake
4
by: Maur | last post by:
Hi all, I have 2 tables say t_OLD and t_NEW. The new has corrections for audit purposes. They are identical in all respects (i.e. new is a copy of old and then changes are made to t_new) ...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
1
by: Stephen | last post by:
I am trying to compare the tables in two similar databases using the SQLDMO object. I am able to use this object to access different SQL servers and choose two different databases. The versions of...
3
by: Kiran B. | last post by:
Hi, I am new to .net. I have two Data Structure Type ... Sturcture A and Structure B. Structure A Public Fname as String Public LastName as String Public City as String Public Zip as String...
50
by: titan nyquist | last post by:
I wish to compare two structs via == but it does not compile. I can overload and create my own == but am I missing something that c# already has implemented? ~titan
3
by: =?Utf-8?B?UmljY2FyZG8=?= | last post by:
What is the best method to compare 2 array to knw if each element is equal? Now, i have to compare the datarow.itemarray of 2 datarows wich is equals in structure. I tried to write this routine:...
2
by: Ecohouse | last post by:
I'm using Access 2003 and will have to separate databases with the exact same tables and table structures. I need to be able to compare the table from the second database against the same table...
26
by: neha_chhatre | last post by:
can anybody tell me how to compare two float values say for example t and check are two variables declared float how to compare t and check please help me as soon as possible
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.