How to use CLOB in decode??
I have a very simple table as below:
CREATE TABLE C_POST
(
POST_ID INTEGER NOT NULL,
POST_REPLY_SET CLOB
)
Now I just want to get this field "POST_REPLY_SET" as this format:
If the field "POST_REPLY_SET" is NULL, it should be changed to string "NULL" in my query result.
If the field "POST_REPLY_SET" is not NULL, it should be dbms_lob.substr(post_reply_set).
And based on the string of "POST_REPLY_SET", if it contains change line and return, I need replace change line and return to a space " ".
How to write this SQL? I tried this one: