schneider_ks
asked on
update query two identical tables one to one relationship
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!FilmDetail s, tblBooks1.Subjects = tblBooksonly284!Subjects
WHERE tblBooks1.BookID = tblBooksonly284.BookID;
Thanks.
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,
WHERE tblBooks1.BookID = tblBooksonly284.BookID;
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or:
UPDATE tblBooks1,tblBooksonly284 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!FilmDetail s, tblBooks1.Subjects = tblBooksonly284!Subjects
WHERE tblBooks1.BookID = tblBooksonly284.BookID;
AW
UPDATE tblBooks1,tblBooksonly284 SET tblBooks1.YrWritten = tblBooksonly284!YrWritten,
WHERE tblBooks1.BookID = tblBooksonly284.BookID;
AW
ASKER
Excellent. Problem Solved. Thanks for the quick fix
ASKER