Customer recently moved the oracle and ppas, finally can use for a long months; But there is also a function has not been able to solve, baidu for a long time, haven't been able to very good solution, the great god help
Oracle database migration ppas, rncontinueratecalm function in Oracle can be carried out smoothly, perform an error in the ppas,
Ppas function in the error message: the Procedure execution failed
ERROR: array value must start with "{" or dimension information
CONTEXT: edb - SPL function rncontinueratecalm (character varying, character, varying character varying, character, varying character varying, integer, timestamp without time zone, timestamp without time zone, timestamp without time zone, timestamp without time zone, character, varying character varying) while casting the return value to the function 's return type
Function returns a value for a custom type rncontinuerateresult, create a custom type statement:
The CREATE OR REPLACE TYPE RNCONTINUERATE As Object
(
GroupColumn Varchar2 (60),
SumSignPrem Number (18, 2),
SumRnPrem Number (18, 2),
SumSignCount integer,
SumRnCount integer,
ContinueRate Number (18, 4)
)
The CREATE OR REPLACE TYPE rncontinuerateresult is table of RNCONTINUERATE;
Functions are defined at the beginning the return value type:
M_Data rncontinuerate:=rncontinuerate (null,
Null,
Null,
Null,
Null,
Null);
Copy function at the end of the return value is as follows:
V_Rc: cursor
The Open v_Rc For
The select of al-qeada roupColumn,
The Sum (NVL (a.s ignprem, 0) * a.s harerate),
The Sum (NVL (a.r nprem, 0) * a.s harerate),
Count (distinct innercontno),
Count (distinct actugetno),
Decode (Sum (NVL (a.s ignprem, 0) * a.s harerate),
0,
0.8,Round (Sum (NVL (a.r nprem, 0) * a.s harerate)/
The Sum (NVL (a.s ignprem, 0) * a.s harerate),
4))
The from Faagentconttmp a
Where al-qeada roupColumn is not null
Group by atul gawande roupColumn;
end if;
end if;
Loop
The Fetch v_Rc
Into m_Data GroupColumn, m_Data SumSignPrem, m_Data. SumRnPrem, m_Data. SumSignCount, m_Data. SumRnCount, m_Data. ContinueRate;
Exit the When v_Rc % Notfound;
End Loop;
The Close v_Rc;
Return m_Data;