title: How to use openquery for inserting geometry data from my server into linked server
body: <p>I am trying to use a query modified from MS docs to insert GEOMETRY data from my sql server into a linked sql server (Azure).</p>
  
  <p>openquery for select works fine with the client's choice of naming for their db which includes '-' ([their-db-name]).</p>
  
  <pre><code>SELECT * FROM openquery([LINKED SERVER],
     'SELECT [geometry] FROM [their-db-name].[theirSchema].[Dimensions]');
  
  ** correct result set returned **
  </code></pre>
  
  <p>However when I try INSERT I get:</p>
  
  <pre><code>INSERT openquery([LINKED SERVER],
      'SELECT [geometry] FROM [their-db-name].[theirSchema].[Dimensions]')
  SELECT [geometry] FROM [my_db].[dbo].[Dimensions];
  
  Msg 102, Level 15, State 1, Line 27
  Incorrect syntax near '-'.
  </code></pre>
  
  <p>I don't have any control over their use of '-' in naming, however since the name is enclosed in '[]', and the openquery SELECT statement works fine I have exhausted all the syntax errors I can think of. 
  Using 'INSERT INTO' makes no difference.</p>
  
  <p>How can I make an insert work?
  Thanks in advance!</p>