I have select:
select v.accs, v.currency,v.amount,v.drcr_ind, count(*) qua,wm_concat(ids) npx_IDS,
wm_concat(px_dtct) npx_DTCT
from table v
group by accs, currency, amount, drcr_ind
but i get error ORA-06502: PL/SQL: : character string buffer too small if i'll remove one string, because sometimes (when v.accs= 3570) count(*) = 215
but when i try to skip using wm_concat for v.accs= 3570 for example this way:
select v.accs, v.currency,v.amount,v.drcr_ind, count(*) qua,wm_concat(ids) npx_IDS,
(case when v.accs = 3570 then wm_concat(px_dtct) else 'too many' end) npx_DTCT
from table v
group by accs, currency, amount, drcr_ind
i still have the same error message. But why? How can i fix it?
Thanx