Home > database >  Pb8.0 how to invoke a custom function in Oracle?
Pb8.0 how to invoke a custom function in Oracle?

Time:09-21

The oracle function F_SS structure:
The create or replace function F_SS (
A_numN1 in NUMBER,
A_strS1 in VARCHAR2,
A_numN2 in NUMBER,
A_strS2 in VARCHAR2,
A_numN3 in NUMBER,
A_strS3 in VARCHAR2,
A_strS4 in VARCHAR2)
RETURN varchar2 IS
The RESULT VARCHAR2 (4);
The BEGIN
INSERT INTO Scott. T_cs (N1 and S1, N2, S2, N3, S3, S4) VALUES (a_numN1 a_strS1, a_numN2, a_strS2, a_numN3, a_strS3, a_strS4);
Return (Result);
End F_SS;

PB after this function is performed in the oracle:
Execute Scott F_SS 11111111, 'no', 11.11 '11111111', 00001, 'no', 'no'

ORA - 06550: line 1, 21 columns:
PLS - 00306: call 'F_SS number or type parameter error
ORA - 06550: line 1, column 7:
PL/SQL Statement ignored

Parameter type yes, also, what's going on,,

CodePudding user response:

With the method of the stored procedure call
Delcare procedure pf_ss for f_ss;
The open pf_ss (: arg1, arg2.. )
If the sqlca. Sqlcode=0 then
Fecth pf_ss into: the result;
end if
  • Related