tables

R

RKS

I have two tables. the first one has many fields but
three of them are first name, last name and
contributions. the first and last name is populated in
the table and the contributions is blank. The second
table has three fields....first name, last name, and
contribution. All are populated and the contribution is
populated with YES. This is a subset of the bigger table
ie., those that have contributed Yes. How can I get my
first, big table updated with the YES in contribution
field matching the first and last name? thank you
 
R

Rick Brandt

RKS said:
I have two tables. the first one has many fields but
three of them are first name, last name and
contributions. the first and last name is populated in
the table and the contributions is blank. The second
table has three fields....first name, last name, and
contribution. All are populated and the contribution is
populated with YES. This is a subset of the bigger table
ie., those that have contributed Yes. How can I get my
first, big table updated with the YES in contribution
field matching the first and last name? thank you

Use an update query...

UPDATE Table1 INNER JOIN Table2
ON Table1.LastName = Table2.LastName
AND Table1.FirstName = Table2.FirstName
SET Table1.Contributions = Table2.Contributions
 
J

John Vinson

I have two tables. the first one has many fields but
three of them are first name, last name and
contributions. the first and last name is populated in
the table and the contributions is blank. The second
table has three fields....first name, last name, and
contribution. All are populated and the contribution is
populated with YES. This is a subset of the bigger table
ie., those that have contributed Yes. How can I get my
first, big table updated with the YES in contribution
field matching the first and last name? thank you

Rick's suggestion will work *if* you have a unique Index on the
combination of first name and last name.

This can be a MAJOR problem however; names are not unique. Suppose you
have three people in your main table, all named Jim Smith. There's Jim
Smith the corporate lawyer, Jim Smith the self-employed artist, and
Jim Smith the shoe salesman. Your contributions table says that Jim
Smith contributed.

Which one gets the credit?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top