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

Create procedure with Cursors, input, and output.

From: Rodger <rodger_at_infobahn.mb.ca>
Date: 1997/04/03
Message-ID: <3343BD1D.18FF@infobahn.mb.ca>#1/1

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)

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. Received on Thu Apr 03 1997 - 00:00:00 CST

Original text of this message

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