Home > database >  O great god writing oracle stored procedure
O great god writing oracle stored procedure

Time:10-10

Drew a excel prototype, to achieve insert function calculation, dynamic variables or under the cursor to realize,

CodePudding user response:

Webmaster, this is the calculation model, the last time the post needs to implement function

CodePudding user response:

Stored procedures are superfluous, an insert statement can directly fix,

Combination of two points not clear, repeat and iccid repeat after all data rollback is want?

CodePudding user response:

According to a rollback all wrong first, table a table c no duplicate data wrote a
 insert into d (zhidinglie) 
Select a t1. Zhidinglie from (
Select a t1. *,
Max (greatest (
Mul1,
Mul2
)) over () flag
The from (
Select a t1. *,
T2. Id,
NVL (t3. The GPS, 0) aaa,
T1. GPRS + t1. Yjbf SSS,

Row_number () over (partition by t1. The month, t1. The isp) mul1,
Row_number () over (partition by t1. Iccid) mul2,

The from t1, b a t2, t3,
cWhere a t1) iccid=t2) iccid (+)
And t1) iccid=t3) iccid (+)
) t1
) t1
Where a t1. The flag=1
;
  • Related