I'm trying to get the following SQL statement to work:
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' );
When I run this statement, I get the following error:
ORA-00904: "UPDATE_TABLEA"."ID": invalid identifier
Can I not use a variable scoped outside of the nested select within the nested select? Any thoughts?
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.