I have some rtf fields in my database store as CLOB that I would like to convert to plain text. I have achieved doing that by creating an index and using the function CTX_DOC.FILTER.

However the problem is that I see many superfluous empty spaces and enters in my result, corresponding assumingly with the removed tags.
However, I do want to display empty rows resulting from the through value of the CLOB field. My sql code is as follows:

I know this is an old thread, but I see that it was not reponded to. I found it in the SQL and PL/SQL forum and moved it here to the TEXT forum where it belongs. Your problem is unclear. You said that you DO want to diplay empty rows. If so, then what is the problem? If you meant that you DO NOT want to display empty rows, then you can use the REPLACE function on your line variable to remove any spaces, tabs, double line feeds, or other characters, prior to returning the value of the line variable. You may need to check some of your results to see what all of thoe characters are and it may be easier to use their ascii values as chr(value) instead of copying and pasting them.