# Related Sites > SQL Course >  update query with 2 tables

## minckle

please can someone help

i have two tables with info in
is it possible to update a record in one table with a record from anoher table

this is the code to do it in MS Access

UPDATE tblPromo, tblCurrentUser  
SET tblPromo.PromoOperator = [UserName]
WHERE (((tblPromo.PromoOperator) Is Null));

i want to get the username from the tblcurrentuser and put it in Promooperator in tblPromo where PromoOperator is null

hope someone can undesrtand me and help
thanks

----------


## sduggan

I think the missing link here is join information between the two tables tblCurrentUser and tblPromo.  

perhaps this might work (if you file in the gaps):

update tblPromo
set tblPromo.PromoOperator = tblCurrentUser.UserName
from tblPromo
join tblCurrentUser
  on tblPromo.<pkid?> = tblCurrentUser.<fkid?>
where tblPromoOperator is null

I have assumed the tables are joined via pk and fk, but so long as a valid join and be made the join method should be valid.

Cheers sduggan...

----------


## minckle

thanx 4 ur help ill give it a try

----------

