Home > database >  How to remove list multiple data in oracle to insert into the parameter to the function
How to remove list multiple data in oracle to insert into the parameter to the function

Time:09-29

In stored procedures need to remove a list of three fields (each field has more than one value), and then separately in three fields of value as a function of the call, the other two fields is the default value, should be how to write?
Such as: column1, column2, column3 corresponding multiple values, column4 column5 is the default value can be written death call
Take the data table select column1, column2, column3 from tableA


Call the function for
The FUNCTION FUNCTION_nameA (column1 IN VARCHAR2,
Column2 IN NUMBER,
Column3 IN NUMBER,
Column4 IN VARCHAR2,
Column5 OUT VARCHAR2) RETURN NUMBER IS

V_1 VARCHAR2 (3000) :=';
V_2 NUMBER (12) :=0;
V_3 NUMBER (12) :=0;
I_4 NUMBER (10) :=0;
.
END;

CodePudding user response:

Build a stored procedure and function respectively
A stored procedure call functions in the
The select FUNCTION_nameA (? ,? ,? ,?) INTO the NUMBER FROM DUAL;
Or write it directly estimated also try
? :=FUNCTION_nameA (? ,? ,? ,?) ;
The default function into to a default line.
Column3 NUMBER IN the default one

CodePudding user response:

Select FUNCTION_nameA (columnA columnB, columnC, 'the fourth field', 'the fifth field) from tableA;

CodePudding user response:

The original poster stick your function is complete, again what is your actual demand,
  • Related