ora-01841
select sum(a), sum(b), sum(c) from(
select count(distinct v.visit_id) a,count(ob.actual_dispense_amount) b, 0 c
from t_iadt_visit v,t_iadt_account a,t_idw_orderbilling ob
where v.discharge_wards =$P{ward}
and v.visit_id=a.visit_id
and ob.account_id=a.account_id
and ob.billing_type=60350
and v.discharge_datetime>= to_date($P{month}||'-01','yyyy-MM-dd')
and v.discharge_datetime< add_months(to_date($P{month}||'-01','yyyy-MM-dd'),1)
and ob.active_flag='Y'
and ob.item_type='030302'
and ob.item_id in (select i.index_item_id from t_fm_reportindexitem i where i.ri_id=24)
union all
select 0 a, 0 b,count(b.id) c from t_iadt_beds b where b.ward=$P{ward} and b.item_type='030302' and b.item_id in (select i.index_item_id from t_fm_reportindexitem i where i.ri_id=24)
)
请问为什么会出现(完整)年份值必须介于-4713和+9999之间,且不为0