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: Create procedure with Cursors, input, and output.

Re: Create procedure with Cursors, input, and output.

From: Claude-Sebastien Jean <csjean_at_logimens.com>
Date: 1997/04/05
Message-ID: <3346ACB7.5B0F@logimens.com>#1/1

Rodger wrote:
>
> I hope that this hasn't been posted twice, but I
> can't find it anywhere in the messages.
>
>
> I want to create a procedure. This procedure will have:
> - input variable(s)
> - output variable(s)
> - a cursor within the procedure. I must be able to control the
> pointer movement in the cursor with Open, Close and Fetch statements.
>
> What is aggravating is that I can get things to work
> in SQLPLUS, but I can't get them to work in PL/SQL.
>
> IN SQLPLUS:
>
> declare
> CURSOR NTSI IS
> Select
> ntsi_ref,
> ntsi_code
> from agt_ntsi;
> var_ntsi_ref agt_ntsi.ntsi_ref%type;
> var_ntsi_code agt_ntsi.ntsi_code%type;
> begin
> open ntsi;
> fetch ntsi into var_ntsi_ref, var_ntsi_code;
> DBMS_OUTPUT.PUT_LINE(var_ntsi_ref || ' , ' || var_ntsi_code);
> close ntsi;
> end ;
>
> 1234, the_result
> PL/SQL procedure successfully completed.
>
> However, trying to do similar things in PL/SQL will only give:
>
> Warning: Procedure created with compilation errors.
>
> How can I get the simple concept to work in reality?
>
> Thanks in Advance.

Hi.

When you do a 'SHOW ERRORS', what does it say???

-- 
CSJ
csjean_at_logimens.com

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT/O d(--) s++:++ a- C++(++++)$ UL+>++++$ P+>++++$ 
L++>+++++$ E W+ N++ !o K--? w--- O-- M-- V-- PS+(+++) PE
Y+(++) PGP(+) t+(+++) 5-- X++(+++) !R tv+ b+++(++) DI+++(++++) 
D++ G e++ h-- r* y+ 
------END GEEK CODE BLOCK------
Received on Sat Apr 05 1997 - 00:00:00 CST

Original text of this message

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