如何将Oracle查询的结果集转换成一维或二维数组
答案:2 悬赏:80 手机版
解决时间 2021-04-07 16:30
- 提问者网友:愿为果
- 2021-04-06 17:14
如何将Oracle查询的结果集转换成一维或二维数组
最佳答案
- 五星知识达人网友:duile
- 2021-04-06 17:42
不知道楼主是指oracle的表类型,或者在表类型里面存储record类型,可以实现,一维或二维数组的情形。
全部回答
- 1楼网友:毛毛
- 2021-04-06 17:55
select
a.fnumber fnumber,
b.fname fname,
sum(case when l.fname like '工资费用%' then g1.frecamount end) fmoney10,
sum(case when l.fname like '%_直接工资' then g1.frecamount end) fmoney11,
sum(case when l.fname like '%_工伤保险费' then g1.frecamount end) fmoney12,
sum(case when l.fname like '%_养老保险-个人' then g1.frecamount end) fmoney13,
sum(case when l.fname like '%_培训费' then g1.frecamount end) fmoney14,
sum(case when l.fname like '%_奖金' then g1.frecamount end) fmoney15,
sum(case when l.fname like '%_公积金-个人' then g1.frecamount end) fmoney16,
sum(case when l.fname like '%_生育保险费' then g1.frecamount end) fmoney17,
sum(case when l.fname like '%_女工补助' then g1.frecamount end) fmoney18,
sum(case when l.fname like '%_独生子女奖励' then g1.frecamount end) fmoney19,
sum(case when l.fname like '研发支出%' then g1.frecamount end) fmoney20,
sum(case when l.fname like '%差旅费' then g1.frecamount end) fmoney21,
sum(case when l.fname like '%专利维护费' then g1.frecamount end) fmoney22,
sum(case when l.fname like '财务费用%' then g1.frecamount end) fmoney30
from
t_bd_yfxm a
inner join
t_bd_yfxm_l b
on a.fid = b.fid and a.fcreateorgid = '245001'
left join
v_cb_expallocrevinsendentry_dy g1
on g1.frecyfxmid = a.fid
left join
t_bd_expense_l l
on g1.frecexpenseitemid = l.fexpid
group by
a.fnumber,b.fname
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯