update query two identical tables one to one relationship
Posted on 2006-05-10
HELP! I'm trying to restore data that was inadvertently deleted from a table with data from a backup table. I need to update the fields in tblBooks1 with the data in the fields in tblBooksonly284 for all records in tblBooksonly284.
I tried this query, but am getting pop-ups that are asking for parameter values for all tblBooksonly284 fields.
I tried earlier but negleted to add the WHERE clause, and it deleted ALL data from all of these fields, I had backed up the data, so am trying again.
What am I doing wrong?
The identical field is an autonumber field. Hopefully it's possible to join those fields.
UPDATE tblBooks1 SET tblBooks1.YrWritten = tblBooksonly284!YrWritten, tblBooks1.NoPages = tblBooksonly284!NoPages, tblBooks1.Summary = tblBooksonly284!Summary, tblBooks1.GenreID = tblBooksonly284!GenreID, tblBooks1.[Film Title] = tblBooksonly284!FilmTitle, tblBooks1.FilmDate = tblBooksonly284!FilmDate, tblBooks1.FilmDetails = tblBooksonly284!FilmDetails, tblBooks1.Subjects = tblBooksonly284!Subjects
WHERE tblBooks1.BookID = tblBooksonly284.BookID;