I have a temp table with a field fname and email.
and I need to update my tbl_user with the fname from the temp table where the email matches the email from the temp table.
here is my SQL
update tbl_user set fname =
(select fname from tbl_temp where tbl_temp.email = tbl_user.email)
where tbl_user.email = tbl_temp.email
and I'm getting an error
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "tbl_temp.email" could not be bound.