Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combining tables

Status
Not open for further replies.

ryanbrand

Programmer
Oct 28, 2003
22
US
Hi,
I have an updating issue with my one of my database tables. I have an old table with fields that are accurate, except for one of the fields. I have another table that has the same records (plus many more) with the correct information in the field that is outdated in the other table, but doesn't have any other information. Both the tables have the primary keys.

I'm using an Access Database. How could I update my records? There are sample tables below to help explain.

Thank you for your help.

Ryan

OldTable
ID First Last Counselor
1 Sam Kin Jim
2 Jill Smith Mary
3 James Carls Ginger


NewTable
ID NewCounselor
1 Kirt
2 Jacky
3 Mark
4 Barb
45 Nick
54 Terry

 
[tt]update OldTable
inner
join NewTable
on OldTable.ID = NewTable.ID
set OldTable.Counselor
= NewTable.NewCounselor[/tt]


rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top