execute immediate shows ORA-00900: invalid SQL statement
249698Oct 31 2007 — edited Oct 31 2007Hi,
First to avoid misleading:
I know that I need to grant neccessary privileges directly to user, to make execute immediate work.
I have a Function, which generates a "create trigger..." statement and execute it by "execute immediate sql_stmt;" afterwards.
This line always brings ORA-00900: invalid SQL statement.
When I output the stmt and execute that output directly at SQL*Plus, it's fine, no errors !
Here is, what I did to isolate the problem:
1. I granted all (!) system-privileges directly to the Function-owner. Problem is unchanged.
2. I paste the generated stmt hard-coded in variable "sql_stmt" (just for testing) and let it execute with 'execute immediate sql_stmt;'. That works fine as well.
Can anyone tell me, what is still missing ? Is it some more privileges ?
thanks for any tip