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: Steve Howard <stevedhoward_at_gmail.com>
Date: Sun, 17 Jun 2007 01:46:27 -0000
Message-ID: <1182044787.357461.17480@c77g2000hse.googlegroups.com>


On Jun 16, 6:32 pm, Guilherme <guilhermecsanc..._at_gmail.com> wrote:
> 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...

Your code won't compile, so you surely get an error when you run what is above. Please post what you are really running, and maybe someone can help.

Regards,

Steve Received on Sat Jun 16 2007 - 20:46:27 CDT

Original text of this message

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