日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

过程 oracle 写在哪里,Oracle怎么写存储过程? 在什么地方写以及怎么调用?最好给个Sample 急(2)...

發(fā)布時(shí)間:2025/4/16 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 过程 oracle 写在哪里,Oracle怎么写存储过程? 在什么地方写以及怎么调用?最好给个Sample 急(2)... 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

當(dāng)前位置:我的異常網(wǎng)? Java Web開發(fā)???Oracle怎么寫存儲(chǔ)過程? 在什么地方寫以及怎么調(diào)用

Oracle怎么寫存儲(chǔ)過程? 在什么地方寫以及怎么調(diào)用?最好給個(gè)Sample 急(2)

www.myexceptions.net??網(wǎng)友分享于:2013-03-27??瀏覽:244次

select sum(times_m) into vcalledtimes_min from (select servicename,ceil(to_char((to_date(endtime, 'yyyy-mm-dd hh24:mi:ss ')-to_date(begintime, 'yyyy-mm-dd hh24:mi:ss '))*24*60-0.25)) as times_m,round(to_char((to_date(endtime, 'yyyy-mm-dd hh24:mi:ss ')-to_date(begintime, 'yyyy-mm-dd hh24:mi:ss '))*24*60*60),0) as times_s from origcdr where (callingnumber like '13% ' or callingnumber like '15% ') and callednumber like '10176% ' and substr(begintime,1,10) > = vbegintime and substr(begintime,1,10) <= vendtime) where times_s> 15 and servicename=vservicename;

-----人均使用時(shí)長(zhǎng)-----

select sum(times) into vcalledtimes_sec_tem from (select round(to_char((to_date(endtime, 'yyyy-mm-dd hh24:mi:ss ')-to_date(begintime, 'yyyy-mm-dd hh24:mi:ss '))*24*60*60),0) as times from origcdr where (callingnumber like '13% ' or callingnumber like '15% ') and callednumber like '10176% ' and substr(begintime,1,10) > = vbegintime and substr(begintime,1,10) <= vendtime and servicename=vservicename);

vcalledtimes_avg := round(vcalledtimes_sec_tem/vcallednum_peo,2);

-----人均撥打次數(shù)-----

vcalledcount_avg := round(vcalledcount/vcallednum_peo,2);

-----預(yù)計(jì)信息費(fèi)------

select servicecost into vservicecost from servicetype where servicename=vservicename;

vcalledcost := round(vservicecost*vcalledtimes_min,1);

end if;

insert into called_temp (servicename,calledcount,callednum_peo,callednum_peo_15,calledtimes_sec,calledtimes_min,calledtimes_avg,calledcount_avg,calledcost)

values(vservicename,vcalledcount,vcallednum_peo,vcallednum_peo_15,vcalledtimes_sec,vcalledtimes_min,vcalledtimes_avg,vcalledcount_avg,vcalledcost);

dbms_output.put_line(vservicename);

dbms_output.put_line(vcalledcount);

dbms_output.put_line(vcallednum_peo);

dbms_output.put_line(vcallednum_peo_15);

dbms_output.put_line(vcalledtimes_sec);

dbms_output.put_line(vcalledtimes_min);

dbms_output.put_line(vcalledtimes_avg);

dbms_output.put_line(vcalledcount_avg);

dbms_output.put_line(vcalledcost);

fetch curservericetype into ee;

end loop;

close curservericetype;

end;

文章評(píng)論

《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀

總結(jié)

以上是生活随笔為你收集整理的过程 oracle 写在哪里,Oracle怎么写存储过程? 在什么地方写以及怎么调用?最好给个Sample 急(2)...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。