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: PROCEDURE WITH CURSOR PROBLEM

Re: PROCEDURE WITH CURSOR PROBLEM

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Sun, 17 Jun 2007 01:21:26 GMT
Message-ID: <q00di.436589$7g3.38959@newsfe14.phx>


Guilherme <guilhermecsanches_at_gmail.com> wrote in news:1182033145.767132.240730_at_q69g2000hsb.googlegroups.com:

> Hi,
>
> Iīm trying to create a procedure, then returns a dynamic cursor, like
> this:
>
> CREATE PROCEDURE p_name(
> ret OUT SYS_REFCURSOR,
> p1 IN NUMERIC
> )
> IS
> BEGIN
> DECLARE sql VARCHAR
> sql := 'select * from table';
> IF p1 IS NOT NULL THEN
> sql := sql||'WHERE id = '||p1;
> END IF
> OPEN ret FOR sql;
> END;
>
> but itīs not working, I donīt have a error when I create, but when I
> call this procedure doesn't work.
> What can I do? Please Help me...
>
>

Learn better PL/SQL programming technique(s).

What business problem are you really trying to solve? Received on Sat Jun 16 2007 - 20:21:26 CDT

Original text of this message

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