I guess you could display the chunks as seperate rows ?
SELECT ROWNUM as chunk_no,ID, SUBSTR (t1.clob_col, (ROWNUM-1)*4000, 4000) AS chunk
FROM t1
CONNECT BY (ROWNUM-1)*4000 <= LENGTH(t1.clob_col)
or if there is a constraint on the maximum size a clob could be in you system you could hard code the number of text columns returned
SELECT SUBSTR (t1.clob_col, 1, 4000) AS pt1,
CASE WHEN LENGTH (t1.clob_col) > 4000 THEN SUBSTR (t1.clob_col, 4001, 4000) END AS pt2,
CASE WHEN LENGTH (t1.clob_col) > 8000 THEN SUBSTR (t1.clob_col, 8001, 4000) END AS pt3,
CASE WHEN LENGTH (t1.clob_col) > 12000 THEN SUBSTR (t1.clob_col, 1201, 4000) END AS pt4
FROM t1
http://stackoverflow.com/questions/7357999/displaying-clob-column-with-4000-characters
No comments:
Post a Comment