<p>I'm trying to get the following SQL statement to work:</p>

<pre><code>UPDATE myschema.tableA update_tableA
   SET field_id = 
   ( SELECT src.field_id 
         FROM myschema.srcTable src
         INNER JOIN myschema.tableB tableB ON 
            update_tableA.id = tableB.id 
            AND SDO_ANYINTERACT( tableB.shape, src.shape ) = 'TRUE' );
</code></pre>

<p>When I run this statement, I get the following error:</p>

<pre><code>ORA-00904: "UPDATE_TABLEA"."ID": invalid identifier
</code></pre>

<p>Can I not use a variable scoped outside of the nested select within the nested select?  Any thoughts?</p>

<p>P.S. The identifier is indeed valid in the database table.  The problem appears to be scope, but I want to make sure that is indeed an issue.</p>

Looking at the SQL above, here is what I am thinking
1) myschema.tableA doesn't have ID column (it could be field_id)
2) The SELECT doesn't seem to provide a join condition
```
SELECT src.field_id 
         FROM myschema.srcTable src
         INNER JOIN myschema.tableB tableB ON
```
Where is the condition to JOIN src with tableB?