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!

SQL : Using SELECT statement with an UPDATE statement

Status
Not open for further replies.

JONBOY74

Technical User
Sep 11, 2001
36
US
Hi all

I'm sure this is very easy but I'm ill and I just can't work it out!!!

I need to update a table using data from a second table, so how do I use a SELCT statement in conjunction with an UPDATE statement.

NB: I'm using an access database

Please help, once this is sorted I can go home!!!!

Thanks

Jon
 
Code:
update tblSomeTable
set fld = (select OtherFld from tblOtherTable
            where tblSomeTable.KeyFld = tblOtherTable.KeyFld)


Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top