title: Sybase, execute string as sql query
body: <p>In Sybase SQL, I would like to execute a String containing SQL. </p>
  
  <p>I would expect something like this to work</p>
  
  <pre><code>declare @exec_str char(100)
  select @exec_str = "select 1"
  execute @exec_str
  go
  </code></pre>
  
  <p>from the  <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.commands/html/commands/commands56.htm" rel="noreferrer">documentation of the exec command</a> </p>
  
  <blockquote>
    <p>execute | exec</p>
    
    <blockquote>
  <pre><code>is used to execute a stored procedure or an extended stored
  </code></pre>
      
      <p>procedure (ESP). This keyword is
      necessary if there are multiple
      statements in the batch.</p>
    </blockquote>
    
    <p>execute is also used to execute a string containing Transact-SQL.</p>
  </blockquote>
  
  <p>However my above example gives an error. Am I doing something wrong?</p>