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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Which Query to use

Status
Not open for further replies.

dabones99

Technical User
Oct 4, 2002
20
US
Hi all

I have a table with over 4000 records and I was just given a second table with the exact records as the first but with a new field added. I created a new field in my orignal table and now need to update it (my orignal table) with the data from the new table (about 2000 records have changed).

What query type do I use for such an update, and how would I approach it?

Thanks in advance.

Marlon
 
I have some code that takes records from one table and compares them to records in a second table, it then records the differences into a third table. With a little modification this could probally give you exactly what you need. If you would like it to play with

Dave
ToeShot@Hotmail.com
Today Is Tomorrows Yesterday. So Why Wait
 
Marlon,

o Create a new query.

o In the query's design mode link the two tables by their key field(s).

o Do Query | Update Query to make the query be an update query.

o Thus to change all rows of the first table's MyTable1.MyField field to be the same as those of the second table's MyTable2.MyField field:
Field of [MyTable1].[MyField]
UpdateTo of [MyTable2].[MyField]


Best regards,
J. Paul Schmidt - Freelance ASP Web Developer
- Creating "dynamic" Web pages that read and write from databases...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top