Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL question for dynamic SQL
dear list,
I want to write some PL/SQL code that does some SELECT statements that are generated dynamically. e.g the Table Name are passed as parameters....
When compiling the Code I always get an error for the line 'brec bcur%ROWTYPE'
PLS-00320: the declaration of the type of this expression is incomplete or malformed
Please advise...
Dirk
CREATE OR REPLACE.... (schema in VARCHAR2)
....
....
AS
TYPE bcur_t is REF CURSOR;
bcur bcur_t;
brec bcur%ROWTYPE;
BEGIN
OPEN bcur FOR 'SELECT * FROM '||schema;
..
..
END;
Received on Wed Feb 25 2004 - 08:34:09 CST