Declare cursor v_field is
Select * from ep_v_bgtprojbudget_part02 t where t.b dgyear=in_bdgyear and t.x ZQHBM=in_xzqhbm and t.b GT_PMAIN_ID=in_proid;
The begin
For v_field_row v_field in loop
- here can call a function, pass v_field_row this data set to another stored procedure or function,
end loop;
end;
I have to deal with data sets of different processing, according to a statement from the business similar cursor many, but in the end is that such a row, inserted into the list,
CodePudding user response:
Can be inserted into a table, and then other stored procedure or function call read this list of data,Cannot pass data set directly to another stored procedure or function, a cursor is a transaction, do not boast affairs pass parameters, can only be stored in a table,
If the cursor is simple, move the cursor directly to the inside a stored procedure
CodePudding user response:
The parameters of the stored procedure, using ep_v_bgtprojbudget_part02 % rowtype typeCodePudding user response:
Declare cursor v_field isSelect * from ep_v_bgtprojbudget_part02 t where t.b dgyear=in_bdgyear and t.x ZQHBM=in_xzqhbm and t.b GT_PMAIN_ID=in_proid;
The begin
For v_field_row v_field in loop
- here can call a function, pass v_field_row this data set to another stored procedure or function,
- function
SELECT the function name (v_field_row. Field 1, v_field_row field 2... ) FROM DUAL;
- stored procedure
CALL the stored procedure name (v_field_row. Field 1, v_field_row field 2... );
end loop;
end;