title: Insert value into a table in a different database
body: <p>I want to convert a value from a char column to a date and update a table in a different database.</p>
  
  <p>This is my current code:</p>
  
  <pre><code>SELECT  CONVERT(DATE, [CRSE_SDTE], 112)
  FROM    SMBM_DBPELJ.DBPELJ.MSTUMASTER 
  
  UPDATE  DMSTAG.dbo.TEMP_AKAUN_MARA.new_TarikhMulaPengajian
  SET     new_TarikhMulaPengajian = SMBM_DBPELJ.DBPELJ.MSTUMASTER.CRSE_SDTE
  WHERE   DMSTAG.dbo.TEMP_AKAUN_MARA.STUDENTN = SMBM_DBPELJ.DBPELJ.MSTUMASTER.STUDENTN
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <blockquote>
    <p>Msg 7202, Level 11, State 2, Line 3
    Could not find server 'DMSTAG' in sys.servers. Verify that the correct server name was specified.</p>
  </blockquote>
  
  <p>If necessary, I can execute the stored procedure sp_addlinkedserver to add the server to sys.servers.</p>