I have a procedure that is valid and has in it an insert..select statement. Now there is a case where execution of this procedure produces "ORA-00904: : invalid identifier" error from this statement. How is that even theoretically possible? There are no triggers or dynamic SQL.
Also, the ORA-00904 text in sqlerrm is without pointer to any specific identifier that Oracle considers invalid.
Oracle version 9.2.0.8
edit2:
Turns out there was a problem with a function that was called from within that select (replaced it with constants and everything worked). Probably that was the reason that ORA-00904 did not give an identifier. Still, the question remains - how can that be that precompiled code with no dynamic sql gives this error?