|
-
Gurus,
I'm trying to execute a stored procedure from within a different stored procedure. It's not working, so I'm trying to get the syntax right by debugging with an anonymous PL/SQL block. Results are:
SQL> declare
2 p_sequence number;
3 sql_stmt varchar2(100);
4 begin
5 sql_stmt := 'PROC_MPS_WO_PROJ2';
6 EXECUTE IMMEDIATE 'exec '||sql_stmt;
7 end;
8 /
declare
*
ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at line 6
A simple query ('SELECT...') works fine, but for some reason the dynamic SQL doesn't seem to like 'EXEC'. Any ideas appreciated. Thanks.
Joe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|