我有一個選擇:WM_CONCAT使用CASE
select substr(acc,1,4)
,currency
, amount
, module
, count(*)
, wm_concat(trn_ref_no) trn
from all_entries
where date = to_date ('01012010','DDMMYYYY')
group by substr(acc,1,4),currency, amount, module
在這種情況下,我得到一個錯誤: ORA-06502: PL/SQL: : character string buffer too small ... "WMSYS.WM_CONCAT_IMPL"
爲了避免緩衝區限制錯誤我把它改爲:
select substr(acc,1,4)
,currency
, amount
, module
, count(*)
, (case when count(*) < 10 then wm_concat(trn_ref_no) else null end) trn
from fcc.acvw_all_ac_entries
where trn_dt = to_date ('05052010','DDMMYYYY')
group by substr(acc,1,4),currency, amount, module
但即使在這種情況下,我也有同樣的錯誤。我怎樣才能避免這個錯誤?
是不是這相當類似於你問在http://stackoverflow.com/questions/2558771/charater-string-buffer-too-small – Unreason 2010-05-06 08:52:39