Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PROCEDURE WITH CURSOR PROBLEM
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
![]() |
![]() |