title: ORA-01762, sub-query in select
body: <p>I have a very huge statement and during the execution, I am always getting this error: </p>
  
  <blockquote>
    <p>ORACLE - ORA-01762: vopdrv: view query block not in FROM.</p>
  </blockquote>
  
  <p>It seems like it is an internal error and my only chance is trying to rewrite my statement.</p>
  
  <p>My statement looks like this:</p>
  
  <pre><code>Select column1, column2, (Select CASE WHEN ......A.column=..., B.column=..)
  FROM
  Table1, (Select ...) A, (Select...) B
  </code></pre>
  
  <p>So I have a select-query in my Select Statement which references columns in the from part. This error goes away If I remove the subquery in my select-statement, however I don't know how to exactly rewrite it. I have tried to move it in the from-part, however I cannot reference other tables like A or B. I am not sure how to do it</p>