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!

Updating table with reference to another table 1

Status
Not open for further replies.

aalnaif

Technical User
Jan 12, 2007
44
CA
I am trying to update two columns of a table (date and location) so that they are equal to the date and location of another table on a lastname join. Here's is the code I have right now:

update tblA
set tblA.date = tblB.date, tblA.location = tblB.location
where tblA.lastname = tblB.lastname;

I am getting a syntax error with the above code. Does anyone know how to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top