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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update SQL from a joined table

Status
Not open for further replies.

hermantb

Programmer
Aug 30, 2002
18
US
I am trying to make sure account names in two tables are the same, but this update query is failing. What am I doing wrong?

update s set s.account = a.account
from account a inner join accountsummary s on a.accountid = s.accountid

Thanks,
TBH
 
It should be more efficient and clear, if you use a join?

UPDATE s
SET account = a.account
FROM
s
INNER JOIN a
ON a.ID = s.ID

Iker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top