I am working on a report and I need to select the 'text' part of a column value that has RTF characters embeded in the data.. Below is an example of a value:
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl {\f0\fswiss\fcharset0\fprq2 Arial;} {\f1\froman\fcharset0\fprq2 Times New Roman;} {\f2\froman\fcharset2\fprq2 Symbol;}} {\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;} {\stylesheet{\s0\itap0\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}} {\*\generator TX_RTF32 11.0.401.504;} \deftab1134\paperw12240\paperh15840\margl0\margt0\margr4\margb0\pgbrdrhead\pgbrdrfoot\sectd\headery567\footery567 {\header\pard\itap0\plain\f0\fs24\par} {\footer\pard\itap0\plain\f0\fs24\par}\pard\itap0\plain\f1\fs20\cf3 DO NOT ALLOW EXTENDED CREDIT FOR THIS CUSTOMER.\par CUSTOMER IS IN RECEIVERSHIP.\par\par OUTSTANDING BALANCE IS WITH COLLECTIONS.\par\par\par\pard\itap0}
In the example above the actual text reads as follows:
DO NOT ALLOW EXTENDED CREDIT FOR THIS CUSTOMER.
CUSTOMER IS IN RECEIVERSHIP.
OUTSTANDING BALANCE IS WITH COLLECTIONS.
Idealy I would like a function that returns only the text part of the content with end of line indicators so I know when a new line starts, ie:
select rtf_to_text(instructions)
from credit_notes
--the instructions column being the column with the RTF characters embeded with the text that I need and rtf_to_text being the function i hope some good soul will help me with.
Any help would be greatly appriciated.