Monday, January 14, 2008

convert an Oracle CLOB to a string

I had to use the UTL_RAW package so I could do string (aka VARCHAR2) operations:

utl_raw.cast_to_varchar2(utl_raw.cast_to_raw(...))

Note that you can do operations like 'substr' and 'instr', and the result is still a CLOB and not a varchar! Ug.

No comments: