title: Trigger to update data in another DB
body: <p>I have the following schema:</p>
  
  <p>Database: test.
      Table: per_login_user, Field: username (PK), password</p>
  
  <p>Database: wavinet.
      Table: login_user, Field: username (PK), password</p>
  
  <p>What I want to do is to create a trigger. Whenever a <code>password</code> field on table <code>per_login_user</code> in database <code>test</code> get updated, the same value will be copied to field <code>password</code> in Table <code>login_user</code> in database <code>wavinet</code></p>
  
  <p>I have search trough Google and find this solution: <a href="http://forums.devshed.com/ms-sql-development-95/use-trigger-to-update-data-in-another-db-149985.html" rel="nofollow noreferrer">http://forums.devshed.com/ms-sql-development-95/use-trigger-to-update-data-in-another-db-149985.html</a></p>
  
  <p>But, when I run this query:</p>
  
  <pre><code>CREATE TRIGGER trgPasswordUpdater ON dbo.per_login_user
  FOR UPDATE
  AS
  UPDATE  wavinet.dbo.login_user
  SET     password = I.password
  FROM    inserted I
  INNER JOIN
      deleted D
  ON  I.username = D.username
  WHERE   wavinet.dbo.login_wavinet.password = D.password
  </code></pre>
  
  <p>the query return error message:</p>
  
  <pre><code>Msg 107, Level 16, State 3, Procedure trgPasswordUpdater, Line 4
  The column prefix 'wavinet.dbo.login_wavinet' does not match with a table name or alias name used in the query.
  </code></pre>