title: Rebuild Index with Hyphen in Name
body: <p>Using SQL Azure with Index Advisor it generates indices automatically for tables based on some fancy algorithm. We are attempting to implement some maintenance scripts that rebuild fragmented indices but the problem is that the indices generated by the Index Advisor have Guids in them so the query to rebuild the index looks like the following:</p>
  
  <pre><code>ALTER INDEX nci_wi_Table_C17CD092-869C-407C-8623-9F05C8D64E67 ON [dbo].[Table] REBUILD WITH (FILLFACTOR = 90, STATISTICS_NORECOMPUTE = OFF, ONLINE = ON)
  </code></pre>
  
  <p>If you attempt to run this, you get the error:</p>
  
  <pre><code>Incorrect syntax near '-'.
  </code></pre>
  
  <p>I tried wrapping the index name in [ ] and in ' ' but neither works.</p>
  
  <p>Anyone have any ideas how to execute the ALTER INDEX query when there are hyphens in the name of the index?</p>