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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help: Dynamic where clause in a PL/SQL procedure

Re: Help: Dynamic where clause in a PL/SQL procedure

From: Eric Friedman <efried_at_mindspring.com>
Date: 1996/11/05
Message-ID: <55mj8m$rim@camel4.mindspring.com>#1/1

In article <327E3FE2.185D_at_cs.wmich.edu>, mamalik_at_cs.wmich.edu wrote:
>I want to pass as a variable the "where clause" for a cursor in the
> procedure. There must be someway to handle this. Unfortunatly I don't
> have the manuals.
>
> Example:
>
> create or replace procedure dempno(where_clause varchar)
> as
> cursor c is select empno from emp where_clause;
> -- ^^^^^^^^^^^^^^
> -- How can I handle this part
>

You need to use dynamic pl/sql. It's available in a package from Oracle - I think it first shipped with 7.1

The details are a bit gory - if you don't have the manuals, pick up a book on pl/sql or check the Oracle web site.

Eric



Eric Friedman Internet: efried_at_mindspring.com Received on Tue Nov 05 1996 - 00:00:00 CST

Original text of this message

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