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

update query (Max(Date))

Status
Not open for further replies.

prettitoni

Programmer
Apr 22, 2004
74
US
Can someone help me write an UPDATE query that sets the Date of Table1 equal to the Max(Date) in Table2 where the tables are joined on Table1.ID = Table2.ID?
 
how about:

UPDATE TableName T1 SET SomeDate = (SELECT MAX(SomeOtherDate) From Table2Name T2 WHERE T1.ID = T2.ID)

Leslie
 
If only it were that simple....that query gives an error "Operation must use an updateable query
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top