Charater string buffer too small

Posted by Ruslan on Stack Overflow See other posts from Stack Overflow or by Ruslan
Published on 2010-04-01T07:21:30Z Indexed on 2010/04/01 7:23 UTC
Read the original article Hit count: 606

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about sql

Related posts about plsql