Reputation: 1670
I have the following queries:
update a
set dwc=fa.dwc
from b fa
join a mw
on a.fa_state=b.state
where b.dwc=''
;
update a
set dwa=fa.dwa
from b fa
join a mw
on a.fa_state=b.state
where b.dwa=''
I am trying to combine into one- is that possible?
Upvotes: 1
Views: 22
Reputation: 311998
You can have several column clauses in the set
clause. You just need to separate them by a comma (,
):
update a
set dwc=fa.dwc, dwa=fa.dwa -- Here!
from b fa
join a mw
on a.fa_state=b.state
where b.dwc=''
Upvotes: 1