Home » SQL & PL/SQL » SQL & PL/SQL » out param storing the previous value of in param
out param storing the previous value of in param [message #255009] Mon, 30 July 2007 07:05 Go to next message
gautamvv
Messages: 254
Registered: June 2005
Senior Member


CREATE OR REPLACE FUNCTION myfunct
(
    nId             IN  notifications.Fi_id%TYPE,
    n_List       IN  Varchar2,
    n_AdminId      IN  Settings.ADMIN_FUNCT_ID%Type


)
RETURN NUMBER
AS
    l_Prg_Name             VARCHAR2(30) := 'SetEntitledAlerts';
    l_RetMsg               VARCHAR2(200);
    l_RetVal               NUMBER;
    l_sqlstmt		       Varchar2(1000);
    l_tt_List              Dbms_Utility.uncl_array;
    l_Num                  NUMBER;
    p_invalid_parameters   EXCEPTION;


    l_status               ECOF_Org_Funct.active%type;
    l_subscrstatus         alertsubscription.alertstatus%type;

    

BEGIN
----


i have a function like this, in the application , when any
settings are changed, this function is called

now, i need to create a new out parameter, which should
store the previous value of the in parameter n_List
and send it to the middle layer java code

how is it possible to capture the value of n_list somewhere
and send it..how to capture the previous value?

Re: out param storing the previous value of in param [message #255030 is a reply to message #255009] Mon, 30 July 2007 08:02 Go to previous message
Michel Cadot
Messages: 64122
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> declare 
  2    type t is table of integer index by binary_integer;
  3    l_in t;
  4    l_out t;
  5  begin
  6    l_in(1) := 1;
  7    l_in(2) := 2;
  8    l_in(3) := 3;
  9    l_out := l_in;
 10    for i in l_out.first..l_out.last loop
 11      dbms_output.put_line(l_out(i));
 12    end loop;
 13  end;
 14  /
1
2
3

PL/SQL procedure successfully completed.

Regards
Michel
Previous Topic: Query : compilation of invalid objects during execution
Next Topic: Identical records with little time difference
Goto Forum:
  


Current Time: Wed Dec 07 04:53:16 CST 2016

Total time taken to generate the page: 0.07712 seconds