Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Joining Tables

2 views
Skip to first unread message

Chris Harmon

unread,
Jan 10, 2012, 9:06:23 AM1/10/12
to
I am new to access and I can catch on to things pretty quickly so here
is a simple idea of what I want to do but on a muchhhhh larger scale.
I need to take data from table2(new and updated) and combine it with
table1(old database).

Table 1
ID Label
1 a
2 b
3
4 d
6 f

Table 2
ID Label
1 a
2 b
3 c
4 d
5 e

Final Product (table 1 updated)

Table 1
ID Label
1 a
2 b
3 c
4 d
5 e
6 f


In other words Table 1 will be my database. Table 2 will be in the
same format. Sometimes with the same id's with updated(not
duplicated) labels sometimes with new ID's that need to be added.


**If an ID exist in both tables update the information in table1 with
table2 data for that ID.
**If table 2 contains a new ID, Add it to the table1 database

Columbia,SC Chris

unread,
Jan 10, 2012, 9:28:47 AM1/10/12
to
I am new to access and I am in need of starting a cumulative database. I can learn fast but I need the basics. I need to add table 2 data to table 1 which will be my main database. Sample Below:

Table 1(Database)
ID Label
1 a
2 b
3
4
5 e

Table 2(new data to be added)
ID Label
1 a1
2 b
3 c
4 d
6 f

Table 1(AFTER UPDATED WITH TABLE 2 DATA)
ID Label
1 a1 (changed per table2 update)
2 b (no change)
3 c (Updated per table2)
4 d (Updated per table2)
5 e (Record not in table2 therefore no change)
6 f (Record added per table 2 and was not in table 1)

****In general I want no duplicate ID's:
1. If a record exists in both tables then update table 1 with table 2 data.
2. If a record is in table 2 but not table 1 then add the record to table 1.
3. If a record is in table 1 but not in table 2 then retain the table 1 data.

Again. I just need table 1 to be my main database with periodic updates or adds from table 2. I hope someone can get me started. Thank you.
0 new messages