MERGE ENCOUNTERS ORA-904 ON 11.2.0.1
Upgraded database from 11.1.0.7 to 11.2.0.3.A Merge statement that uses subqueries compiled fine in 11.1.0.7. The same statement failed to compile following the upgrade to 11.2.0.3. This behavior is documented in 1190423.1. The solution suggested in the note is to remove the 'Select' subquery from the Merge statement. A team member while investigating the re-write of the Merge query discovered that the compilation error is avoided if the the 'Select' in the Merge is wrapped with a function such as NVL or TRIM. For the Merge statement in the ML note the following modification seems to work . (see the TRIM function around the Select)