Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL EXECUTE IMMEDIATE won't parse...help
I'm having trouble getting EXECUTE IMMEDIATE to parse in Oracle 8. The
following shows a SQL*PLUS session and the resultant error. The command
is straight out of the PL/SQL User's Guide and Reference. I'm guessing
this may have to do with the fact that the EXECUTE command is getting
converted into a BEGIN..END pair. Anyone know what's up?
SQL> CREATE FUNCTION row_count (tab_name CHAR) RETURN INT AS
2 rows INT;
3 BEGIN
4 EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || tab_name INTO rows;
5 RETURN rows;
6 END;
7 /
Warning: Function created with compilation errors.
SQL> show errors function row_count;
Errors for FUNCTION ROW_COUNT:
LINE/COL ERROR
of the following: := . ( @ % ;Received on Tue Jul 27 1999 - 15:42:18 CDT