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 -> exec function?

exec function?

From: Terry Sharp <tsharp_at_witsys.com>
Date: Mon, 14 Jun 1999 13:53:13 -0400
Message-ID: <7k3fi7$m63$1@ffx2nh4.news.uu.net>


I'm new to the Oracle world and have a question regarding how do I test my functions & stored procedures in PL/SQL? Here's the situation:
  I have a function called sp_test that accepts input parameters testnum1,testchar2,testchar3,testnum4 and returns a number returnnum.

how do I declare my variables and call this function in PL/SQL so I get my returnnum back into my local variable?

In Sybase I'd do something like this

declare testnum1 integer;
declare testchar2 varchar(20);
declare testchar3 varchar(40);
declare testnum4 integer;
declare returnnum integer;

select testnum1=1;
select testchar2='test';
select testchar3=test test';
select testnum4=4;

exec returnnum=sp_test(testnum1,testchar2,testchar3,testnum4); select returnnum; - this would display my returnnum value

Thanks in advance,
Terry

Terry Sharp, Data Architect
tsharp_at_witsys.com Received on Mon Jun 14 1999 - 12:53:13 CDT

Original text of this message

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