Re: cursor with dynamic where clause

From: Aurelio Martin <amartin_at_traza-si.com>
Date: Fri, 17 May 2002 14:56:07 +0200
Message-ID: <ac2ufh$m72t2$1_at_ID-50400.news.dfncis.de>


[Quoted] "Stefan Röhle" <roehle_at_uni-mainz.de> escribió en el mensaje news:3CE4E742.214929F4_at_uni-mainz.de...
> Hi,
>
> I'd like to use a a cursor with a dynamic where clause, for example like
> this:
>
> ------------------
> PROCEDURE diff_test (where_clause in varchar2) IS
>
> cursor cur_test is
> select * from vw_data
> where where_clause;
>
> BEGIN
> [do something]
> END;
> ------------------
> Since this doesn't work this naive way - how can I do it?
>
> Stefan

It looks like you need dynamic SQL. Look for package dbms_sql.

Aurelio Received on Fri May 17 2002 - 14:56:07 CEST

Original text of this message