Re: Cursor parameters - problems with 'FROM [inTablename]' statement

From: Alan Mills <Alan.Mills_at_xservices.pants.fujitsu.com>
Date: Fri, 29 Aug 2003 11:48:26 +0100
Message-ID: <binb4k$1qsd$1_at_news.icl.se>


"Sugus" <krug_at_europ.de> wrote in message news:76f56553.0308290221.4b4a65f3_at_posting.google.com...
> I'd like to declare a cursor, which accepts parameters also for the
> "FROM" tablename-clause, like:
>
> CURSOR cFielddef(pfromTable IN ?????, pTableName IN VARCHAR2) IS
> SELECT column_name, data_type, data_length, nullable FROM pfromTable
> WHERE table_name = UPPER(pTableName);
>
> Is it possible at all, and what type do I have to decalre in place of
> the questionsmarks? Any other solution?
>
> Thanks für your help,
>
> Sugus

you would have to use dynamic SQL for this. The parameter would then simply be a VARCHAR2 type, i.e., string. Received on Fri Aug 29 2003 - 12:48:26 CEST

Original text of this message