(
select sum(psnamount) as amount,
sum(psnfundamount) as fundamount,
sum(psnaccramount) as accramount,
sum(psncash) as cashamount
from b_projallotlist
where acctype = '10'
group by projno
)a
ora 00933 SQL command not properly ended
答案:2 悬赏:10 手机版
解决时间 2021-01-04 00:34
- 提问者网友:战魂
- 2021-01-03 21:11
最佳答案
- 五星知识达人网友:不甚了了
- 2021-01-03 21:51
语句没有写完。
前面加上select * from 和最好再加上分号";"。
select * from (select sum(psnamount) as amount,
sum(psnfundamount) as fundamount,
sum(psnaccramount) as accramount,
sum(psncash) as cashamount
from b_projallotlist
where acctype = '10'
group by projno
) a;
或者去掉前后的括弧")"和a,后面再加上分号";"
select sum(psnamount) as amount,
sum(psnfundamount) as fundamount,
sum(psnaccramount) as accramount,
sum(psncash) as cashamount
from b_projallotlist
where acctype = '10'
group by projno;
前面加上select * from 和最好再加上分号";"。
select * from (select sum(psnamount) as amount,
sum(psnfundamount) as fundamount,
sum(psnaccramount) as accramount,
sum(psncash) as cashamount
from b_projallotlist
where acctype = '10'
group by projno
) a;
或者去掉前后的括弧")"和a,后面再加上分号";"
select sum(psnamount) as amount,
sum(psnfundamount) as fundamount,
sum(psnaccramount) as accramount,
sum(psncash) as cashamount
from b_projallotlist
where acctype = '10'
group by projno;
全部回答
- 1楼网友:掌灯师
- 2021-01-03 23:06
(with tab as(
select to_date('2011053100','yyyymmddhh24') start_time,to_date('2011053112','yyyymmddhh24') end_time
from dual
)
select start_time+(level)/24 as time1, start_time from tab connect by level<=(end_time-start_time)*24 ) b 先把这个表做为b表,然后再和你的a表做连接。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯