• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1144
  • Last Modified:

Access 2007 Combine Information in Two Tables

I have a linked table that has "Project Number" and "DVD#" as two of the fields and another linked table that has "Project Number" and "Box Number" as two of the fieds.  One database tracks all of the information stored on DVD and the other database tracks all of the archived paper documents.

I am trying to create a query that will combine the two and reflect changes to either table.    I get an error message that "Project Number" could refer to either table.  I need to have one complete list of project numbers combined from both databases.
0
new_techie
Asked:
new_techie
  • 2
1 Solution
 
bandrieseCommented:
In regards to the error:

Specify the table name allong with Project Number whereever you're using it. For example: [TableA].[Project Number]

In regards to combining the data: It sounds like you need to create a relationship between the two tables. You can drag and drop fields from one table to the other to create the relationship. Your SQL code will look something like this:
SELECT TableA.PrjectNumber, TableA.DVD#, tableb.BobNumber
FROM tableA INNER JOIN tableB ON TableA.ProjectNumber = TableB.ProjectNumber;

Open in new window

0
 
bandrieseCommented:
Another Note to clarify: Creating the relationship will probibly eliminate your error, unless you were using Project Number as a criteria...
0
 
new_techieAuthor Commented:
I found that it was even easier to create a union query.  I had to make sure there was an even number of fields and that the field names matched.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now