title: How to insert a row into a linked server table?
body: <p>I have a server SourceServer I am connected to which has a linked server TargetServer.</p>
  
  <p>How should an insert statement looks like (I need to reference Linked server, database, namespace, table):</p>
  
  <pre><code>//Connected to [SourceServer]
  
  USE [SourceDatabase]
  
  DECLARE @HelloWorld NVARCHAR(255)
  
  SELECT @HelloWorld = Name From dbo.Names where Id = 1
  
  INSERT INTO [TargetServer].[TestDatabase].dbo.TestTable (Name)   VALUES (@HelloWorld)
  </code></pre>
  
  <p>This statement executes with an exception:</p>
  
  <pre><code>Too many prefixes.
  </code></pre>
  
  <p><strong>Update: The syntax as above works fine, the problem was expired password for the sql user used to connect to the linked server :)</strong></p>