Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL question for dynamic SQL

PL/SQL question for dynamic SQL

From: Dirk <dirk_at_ackernet.de>
Date: 25 Feb 2004 06:34:09 -0800
Message-ID: <5169dd26.0402250634.4bf9235e@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US