急求?
select
(select count(F_Key)*10 as cnt from c
where c.f_k in ('5','4','3','2')
and c.f_l in (6334904174790331938)
and c.f_m between TO_DATE('2012-06-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2012-07-26 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
)
as Denominator
出 ora-00923未找到要求的FROM关键字,请问怎么解决?
------解决方案--------------------select
(select count(F_Key)*10 as cnt from c
where c.f_k in ('5','4','3','2')
and c.f_l in (6334904174790331938)
and c.f_m between TO_DATE('2012-06-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2012-07-26 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
)
as Denominator
from dual
------解决方案--------------------select
(select count(F_Key)*10 as cnt from C
where F_Sa = '5'
and F_AS in (6334904174790331938)
and F_In between TO_DATE('2012-06-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2012-07-26 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
)
(select count(F_Key)*9 as cnt from C
where F_Sa = '4'
and F_AS in (6334904174790331938)
and F_In between TO_DATE('2012-06-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2012-07-26 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
)
(select count(F_Key)*6 as cnt from C
where F_Sa = '3'
and F_AS in (6334904174790331938)
and F_In between TO_DATE('2012-06-27 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND TO_DATE('2012-07-26 23:59:59', 'yyyy-mm-dd hh24:mi:ss')
)
(select count(F_Key)*3 as cnt from C
where F_Sa = '2'
&nb