update table from another db table
I have a problem trying to write a query in SQL server 2005.
I want to update records in a table in one database from another table in a different database.
The code is below:
update orig.dbo.[credit]
set orig.dbo.[credit].[limit] = tempdb.dbo.[customer_limits].[cr_limit_amt]
from temp.dbo.[customer_limits]
where temp.dbo.[customer_limits].[cr_acct_id] = orig.dbo.[credit].[legacy_id]
The code parses fine, but when I click the 'Execute' button, I get the error message below:
Msg 207, Level 16, State 1, Line 3
Invalid column name 'limit'.
Please help.
Thanks,
-Tim
|