0

i have a two table one name is "user" and another name is "Prod".

My query is

update User_list_SQL set team=s.uteam, S.flag='Y' 
from User_list_SQL as U, SQlVal as S 
where U.name=S.uname

the error comes the following

[SQL Server]The multi-part identifier "S.flag" could not be bound.

How to write the query the above instance? please advice. Thanks

1 Answers1

0

You cannot update two tables at once. You will need to split it into 2 queries.

Follow below post..

Update multiple tables in SQL Server using INNER JOIN

Community
  • 1
  • 1
Sateesh Pagolu
  • 9,282
  • 2
  • 30
  • 48