Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

From 2 Tables to 1

Posted on 2002-07-18
4
Medium Priority
?
181 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
  • 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 400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

916 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