Home » SQL & PL/SQL » SQL & PL/SQL » IN and OUT parameters
IN and OUT parameters [message #38805] Thu, 16 May 2002 03:10 Go to next message
krishna
Messages: 141
Registered: October 1998
Senior Member
How should we use the 'IN' and 'OUT' parameters in cursors
Re: IN and OUT parameters [message #38807 is a reply to message #38805] Thu, 16 May 2002 04:00 Go to previous message
jeje
Messages: 9
Registered: October 2001
Junior Member
try this...

DECLARE

CURSOR cur_1(PI_1 IN VARCHAR,PI_2 IN VARCHAR) IS
SELECT t.X,
t.Y,
t.Z
FROM tyty t
WHERE t.1 = PI_1
AND t.2 = PI_2;

VAR_OUT CUR_1%ROWTYPE;

BEGIN

OPEN cur_1(VALUE_1, VALUE_2);
FETCH cur_1 INTO VAR_OUT;
CLOSE cur_1;

--VAR_OUT IS THE OUTPUT
--VALUE_1 AND VALUE_2 ARE THE INPUT

END;
Previous Topic: Using decode
Next Topic: wild card filtering
Goto Forum:
  


Current Time: Fri Apr 26 16:21:37 CDT 2024