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

Compare and Update Fields 1

Status
Not open for further replies.

k4ghg

Technical User
Dec 25, 2001
191
US
I have two tables, with identical fields. One table has data that I would like to use to update fields in the second database but am not certain where to start. Any suggestions would be appreciated. Ronnie
 
you could use an update query ... but if it is in another db you may consider replication

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
Thanks, it would not be difficult for me to combine the two tables. But, I am not familiar with the update query. Do you know if I could update selected fields? Thanks again. Ronnie...
 
An example of an update query. This query takes imported data to update a city table
Code:
UPDATE tblImport, tblCity SET tblImport.City = [tblCity].[City_ID]
WHERE ((([tblImport].[City])=[tblCity].[City]));

To create an update query start by creating a new query in design mode. Add your source and destination tables. Under the 'Query' menu change the query type to an update query add the field you want to update and fill in the blanks you can add criteria that will limit when a field is updated.

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top