PC Review


Reply
Thread Tools Rate Thread

MS ACCESS, Compare two similar tables

 
 
New Member
Join Date: May 2011
Posts: 1
 
      17th May 2011
Hi,
I need to compare to tables where there can be data not 100% identical:

We have two tables,Table1 and Table2 both with columns Product name and Producer.
Table 1 is the "master" table.
The data can be showed in table1 as:
Product name: AAA
Producer: GXL

In table the data can be shown as:
Product name: AAA or AAA_A or A_AAA
Producer: GXL

I need to find all AAA in table2 that exists in table1.

I have just started to use ACCESS and need someone that can please explain it for me in details

THX a lot, best regards Alex

Last edited by Alexander R.A; 17th May 2011 at 11:29 PM.. Reason: It dident show up as i wrote it...
 
Reply With Quote
 
 
 
 
New Member
Join Date: May 2011
Posts: 3
 
      24th May 2011
In the second table, make another field (NewField) to store the 3 letter code after stripping off the _A and A_ from the original table (OldField).
Make an update query to update NewField with the contents of OldField (basically, data backup).
Make an update query with a calculated field. BeginUnderscore:left([NewField],2) with a criteria of "*_*" In this query, you will update Newfield with a value of right([oldfield],3).
Make a second update query to check for ending underscores, just reverse the above.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two similar tables Gary Crisp Microsoft Access Queries 2 13th Feb 2008 10:38 PM
Compare multiple fields on 2 similar tables =?Utf-8?B?cGV0eg==?= Microsoft Access Macros 5 24th Aug 2006 10:19 AM
compare policies of two similar machines. MDBJ Windows XP Security 1 1st May 2005 07:29 PM
relating two tables of similar data type with other tables & queri =?Utf-8?B?UEo=?= Microsoft Access Getting Started 4 24th Feb 2005 08:26 PM
Merging two similar but not-so-similar workbooks DiscoJason Microsoft Excel Misc 1 20th Nov 2003 07:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:30 AM.