Update statment with two databases

From: Chieftonw (Chieftonw_at_discussions.microsoft.com)
Date: 09/03/04


Date: Fri, 3 Sep 2004 13:35:03 -0700

I am just starting to work with SQL c0ommands and have what I hope is an easy
question.

Basically I am working with two databases, which contain the same tables
(same table keys). However I want to update one of the columns in one of the
databases to the value from another. How can I use an update command to
reference another database? Should I use another command?

Here is an example fo the statment I have been trying, which is not working:

UPDATE database1.tableB
SET column2 = database2.tableB.column2
WHERE column2 = 'Completed'