Stored procedures in performing the execute immediate l_sql, error ORA - 02070: DL_OA database does not support this function, in the context of if the code executed directly p_updateValue this process, there is no problem, perform p_bi2oaIncome_days, and calls to p_updateValue, execution to execute immediate l_sql; So error ORA - 02070: DL_OA database does not support this function, in the context of asked the great spirit show
Procedure p_bi2oaIncome_days (psdate in varchar2, pedate in varchar2) is
CURSOR C_date IS -- sound obvious CURSOR type
Select the from dt rpt_date_v where dt>=psdate and dt<=pedate;
C_ROW C_date % ROWTYPE; - define the cursor variable
The begin
- the Fetch cycle
The OPEN C_date; - must be clear to open and close the cursor
LOOP
The FETCH C_date INTO C_ROW;
EXIT the WHEN C_date % NOTFOUND;
DBMS_OUTPUT. PUT_LINE (C_ROW. DT | | '+ +');
- do something
P_bi2oaIncome_hospitals (C_ROW. DT);
-
END LOOP;
The CLOSE C_date;
End p_bi2oaIncome_days;
Procedure p_bi2oaIncome_hospitals (pdate in varchar2) is
L_sql varchar2 (2000);
L_yestoday varchar2 (10);
L_startday varchar2 (10);
L_month varchar2 (10);
For I IN 1.. L_orgid. Count LOOP
P_updateValue (l_orgid (I), l_yestoday l_startday, l_orgidOA (I), l_month);
End loop;
End p_bi2oaIncome_hospitals;
Procedure p_updateValue (orgid varchar2, in pdate2 in varchar2, pdate1 in varchar2, orgidOA in varchar2, l_month in varchar2) is
L_sql varchar2 (2000);
L_kpivalue number (12, 2);
L_kpivalueSum number (12, 2);
L_fieldValue varchar2 (50);
L_year number (12, 2);
The begin
L_kpivalue:=0;
L_year:=2021;
If l_month='01' then
L_fieldValue:='field0009';
Elsif l_month='02' then
L_fieldValue:='field0013';
Elsif l_month='03' then
L_fieldValue:='field0017';
Elsif l_month='04' then
L_fieldValue:='field0021';
Elsif l_month='05' then
L_fieldValue:='field0025';
Elsif l_month='06' then
L_fieldValue:='field0029';
Elsif l_month='07' then
L_fieldValue:='field0033';
Elsif l_month='08' then
L_fieldValue:='field0037';
Elsif l_month='09' then
L_fieldValue:='field0041';
Elsif l_month='10' then
L_fieldValue:='field0045';
Elsif l_month='11' then
L_fieldValue:='field0049';
Elsif l_month='12' then
L_fieldValue:='field0053';
The else
L_fieldValue:=';
end if;
- the quantity copy omit
L_sql:='update formmain_8977 @ dl_oa set "' | | l_fieldValue | | '"=' | | l_kpivalue | | 'where "field0002"=' '| | orgidOA | |' ' 'and "field0001"=' | | l_year | | '.
The execute immediate l_sql;
Commit;
End p_updateValue;