Re: newbie question on procedures

From: Andre Rusanoff <arusanoff_at_maxwell.attmail.com>
Date: 1996/02/06
Message-ID: <4f7tgk$38b_at_nm3001.router.kraft.com>#1/1


godzilla_at_seuss.cc.utexas.edu (Jim Lyons) wrote:
>I am trying to create a procedure but cannot. Below is a very simple version
>of my procedure at the output.
>
>Here is the source file:
>===============================================================
>drop procedure testproc;
>
>create procedure testproc as
>begin
> select count(*) from risk;
>end;
>/
>===============================================================
Jim:

You MUST use 'into' within your PL/SQL block when coding a select statement or declare a cursor and then use this cursor within the procedure body:

create or replace procedure testproc as

count number :=0;

begin

        select count(*) into count from risk;
end;

Regsrds

AER Received on Tue Feb 06 1996 - 00:00:00 CET

Original text of this message