The great god, now in order to realize function code following zha to cursor or function such as written? The create or replace procedure pro_unicom_pay2 is The begin The update unicom_midtab1 a The set of GPRS= (select GPRS The from unicom_midtab2 b Where Anderson:=b.i: And to_number (b.g PRS) & lt;> 0.00), IP= (select IP from unicom q where q.i ccid=Anderson, ccid); commit;
Insert into sim_expense (sim, the month, expense, isp, yjbf, GPRS, iccid, traffic, IP) (select b.s im, B.m onth, (b.y JBF + NVL (b.g PRS, 0)), B.i sp, B.y JBF, B.g PRS, B.i ccid. B.t raffic, B.i p The from unicom_midtab1 b); commit; End pro_unicom_pay2;
Probably is inserted to the sim_expense list data, but fields from different tables and fields are the other two fields together, turning the cursor variable that kind of writing
CodePudding user response:
Use excel to draw your original data, and expected results, also want to describe the calculation process,