title: Double Quotes in Oracle Column Aliases
body: <p>Ok, this is bit of an obscure question, but hopefully someone can help me out with it.</p>
  
  <p>The system I'm working on builds a dynamic SQL string for execution inside a stored procedure, and part of that dynamic SQL defining column aliases, which themselves are actually values retrieved from another table of user generated data.</p>
  
  <p>So, for example, the string might look something like;</p>
  
  <pre><code>SELECT table1.Col1 AS "This is an alias" FROM table1
  </code></pre>
  
  <p>This works fine. However, the value that is used for the alias can potentially contain a double quote character, which breaks the outer quotes. I thought that I could maybe escape double quotes inside the alias somehow, but I've had no luck figuring out how to do so. Backslash doesn't work, and using two double quotes in a row results in this error;</p>
  
  <pre><code>SQL Error: ORA-03001: unimplemented feature
  03001. 00000 -  "unimplemented feature"
  *Cause:    This feature is not implemented.
  </code></pre>
  
  <p>Has anyone had any experience with this issue before?
  Cheers for any insight anyone has.</p>
  
  <p>p.s. the quotes are needed around the aliases because they can contain spaces.</p>