sys_connect_by_path and ORA -01489
914404Jun 28 2012 — edited Jun 28 2012select issue_id,
substr(sys_connect_by_path(dk, ','), 2) as deal_string
from (select i.issue_id,
d.deal_key dk,
row_number() over(partition by i.issue_id order by deal_key) as rk,
count(*) over() as cnt
from issuemgmt.issue i,
ctsgapp.deals d,
issuemgmt.issue_deal id
where (i.issue_id = id.issue_id(+))
and (id.deal_id = d.ofac_deal_id(+))
)
where rk = cnt
start with rk = 1
connect by rk = prior rk + 1
We are using oracle 10 g and using sys connect by path for concatenation of deal keys for an issue id .it is not allowing for more than 4000 characters.Our business needs only first 4000 characters.
I have tried using to_clob but not worked.I may be used at the wrong place.could you Please suggest where to use or how to avoid this.