title: SELECT query on a table with a space in the name using SQSH
body: <p>I'm using SQSH (version 2.1) on Ubuntu 10.04 to connect to a MSSQL database using a command like this:</p>
  
  <pre><code>sqsh -S server -U user -P password -D database
  </code></pre>
  
  <p>I have a table called My Table, but I cannot find a way to run a SELECT query on it. This is what I've tried so far:</p>
  
  <pre><code>SELECT * FROM 'My Table'
  go
  </code></pre>
  
  <p>Output: Incorrect syntax near 'My Table'. (I get the same for double quotes)</p>
  
  <pre><code>\set t="My Table"
  SELECT * FROM $t
  go
  </code></pre>
  
  <p>Output: Invalid object name 'My'. (Which is weird because if I do \echo $t, I get the full table name)</p>
  
  <pre><code>SELECT * FROM My\\ Table
  go
  </code></pre>
  
  <p>Output: Invalid object name 'My'.</p>
  
  <pre><code>SELECT * FROM [My Table]
  go
  </code></pre>
  
  <p>Output: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.</p>
  
  <p>This last command works fine for table names without any spaces.</p>
  
  <p>UPDATE: other commands work fine e.g. I can get the table description with:</p>
  
  <pre><code>SELECT column_name,data_type FROM information_schema.columns WHERE table_name = 'My Table'
  go
  </code></pre>