Re: Help debugging in SQLPLUS

From: DavidJRoth <davidjroth_at_aol.com>
Date: 1 Dec 1994 21:50:39 -0500
Message-ID: <3bm21v$6na_at_newsbf01.news.aol.com>


In article <D0597q.7BD_at_cup.hp.com>, jbridges_at_cup.hp.com (Jim Bridges) writes:

The following sample may help:

rem filename: proc_sql.sql
rem

rem	Demonstrate the creation of a procedure
rem	and the SQL*Plus capabilities for interacting
rem	with a stored procedure

rem
set pagesize 58
set newpage 2
set echo on
spool demo_prc.lis
rem
rem Create the procedure
create or replace procedure foo (
	foo1	in	number,
	foo2	out	number,
	foo3	out	varchar2)       is
begin
	foo2 := foo1;

select to_char(sysdate,'dd-Mon-yy') into foo3 from dual; end;
/

rem
rem define variables that can be accessed from pl/sql

variable t1 number
variable t2 varchar2(10)

rem
rem Execute the procedure

execute foo (1,:t1,:t2);

rem
rem Show the results
print t1
print t2

spool off
set echo off Received on Fri Dec 02 1994 - 03:50:39 CET

Original text of this message