Solved

From 2 Tables to 1

Posted on 2002-07-18
4
166 Views
Last Modified: 2012-08-13
EE,
I have two Tables within an Access 2000 db.
They are from separate companies but regarding the same products (vitamins).
I am unable to accurately link the tables on a unique identifier (in this case SKU's) as one company uses the original SKU and other company has altered some (but not all) of them.

For this reason (I believe), I am unable to link the tables on the SKU and enforce referential integrity. I get an error message. There are however, a large number of SKU's that do in fact match.

What I would like to do, is with the products that have SKU's that DO match, take the contents of the "description" field from one table and add it to the other table.

This may sound odd, but I want to make a single comprehensive table of these products that I can then use as a single table database to generate .php pages.
Even though it will be incomplete, there should be about 600-700 SKU matches. A good starting point.

Thanks.
dresdena1


0
Comment
Question by:dresdena1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 7163362
I would start with a select that joins these tables on the SKU and show SKU and the description of both, thus the user can verify these are correct.
Then you can change this select query into a maketable (or append) query to fill the final table.
Next you link the "other" companies table with this final table and force all rows to appear (LEFT join you get by double clicking the join line and option 2 or 3). When you add under the SKU the criterium Is Null, then all mismatches will show.
For these you could try to create a form showing the desciptions of the mismatches and those of the final table and thus enabling the user to correct the SKU's from the second company.

Clear ?

Nic;o)
0
 

Author Comment

by:dresdena1
ID: 7164643
Hi Nico,
The first part worked like a charm. I was wrong however, there are just over 1100 matching records. Excellent!

The second part I am having trouble with.
I am unable to get the other companies table to link correctly with the "New" table.

I go into "Query Design View"
Select all three tables
1)Join 1 old table to the new table on the SKU
2)Double click Join line--> choose option 2
3)Change to a Maketable Query and give it a new name
4)Select SKU from New Table and 1 Old Table for the Query
5)Select Product Name from New Table for the Query
6)Type Null (changes to "Is Null") under Criteria for both SKU entries
7)Try to run Query and get the following error message:
<<
The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement.
<<

Do you know what I am doing wrong?

Being able to easily identify the remaining 500 entries that did not match would be extremely helpful.

Thank you for your help.
dresdena1
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 7165156
Just start with the two tables:
1) The new "final" and the "othercompany"
Then:
Select all three tables
1)Join tables on the SKU
2)Double click Join line--> choose option 2 (or 3) make "othercompany" the "leading one.
3)Select SKU from New Table and "othercompany" for the Query
4)Select Product Name from New Table and "othercompany"
5)Type Null (changes to "Is Null") under Criteria for "New" table SKU entries

This will list the unmatching rows from the "othercompany" table.

When you make a form and use the above unmatch query as a datasheet subform and also show the "New" table besides that with SKU and description (order for both on description), the comparison should be rather easy.
By updating the SKU in the "othercompany" table to an existing "New" code, it will disappear from the unmatched list...

Nic;o)
0
 

Author Comment

by:dresdena1
ID: 7185460
Thanks Nico!
dresdena1
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question