HI There
I have some data from a SQL DB in MultiPart MIME format. What I want is the RTF format out of it.
Here are two samples:
This is a multi-part message in MIME format.
------=_NextPart_015_0536_0032403C.48C36A48 Content-Type:
text/plain; charset=UTF-
8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9A
E0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAAR
QBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANA
AoADQA Content-Transfer-Encoding: binary hi ryan
------=_NextPart_015_0536_0032403C.48C36A48 Content-Type:
text/rtf Content-Transfer-Encoding: binary {\rtf1
\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0
\fnil\fcharset0 MS Shell Dlg 2;}} {\colortbl ;\red0\green0
\blue0;} {\*\generator Msftedit 5.41.15.1515;}\viewkind4
\uc1\pard\tx720\cf1\f0\fs20 hi ryan\par }
------=_NextPart_015_0536_0032403C.48C36A48--
This is a multi-part message in MIME format.
------=_NextPart_005_0057_26846265.F5C90844 Content-Type:
text/plain; charset=UTF-
8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9A
EIAYQB0AGEAbgBnADsAIABFAEYAPQA7ACAAQwBPAD0AMAA7ACAAQwBTAD0AM
AA7ACAAUABGAD0AMQAyAAoADQAKAA0A Content-Transfer-Encoding:
binary it was some thing from 1130 to 330
------=_NextPart_005_0057_26846265.F5C90844 Content-Type:
text/rtf Content-Transfer-Encoding: binary {\rtf1
\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman
\fprq2\fcharset0 Batang;}} {\colortbl ;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard
\tx720\cf1\f0\fs20 it was some thing from 1130 to 330\par
} ------=_NextPart_005_0057_26846265.F5C90844--
I gathered this help from somewhere elese on the forum:
I could build a query like this
"split(split('{dbo.messages.body}', ' fs20')
[2],'\par}')[1]", however that would just get me the text.
I'd like the RTF format, so that if it's green, I see green! I know it's RTF format, because If I make a doc in wordpad, save as rtf, it looks like this if opened in notepad.
"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0
\fnil\fcharset0 MS Shell Dlg 2;}} {\colortbl ;\red0\green0
\blue0;} {\*\generator Msftedit 5.41.15.1515;}\viewkind4
\uc1\pard\tx720\cf1\f0\fs20 hi ryan\par }"
Any ideas? I need to extract it, and then somehow convert it. However, maybe there's a way to convert the whole kit and kaboodle?
Thanks,
Henry
I have some data from a SQL DB in MultiPart MIME format. What I want is the RTF format out of it.
Here are two samples:
This is a multi-part message in MIME format.
------=_NextPart_015_0536_0032403C.48C36A48 Content-Type:
text/plain; charset=UTF-
8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9A
E0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAAR
QBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANA
AoADQA Content-Transfer-Encoding: binary hi ryan
------=_NextPart_015_0536_0032403C.48C36A48 Content-Type:
text/rtf Content-Transfer-Encoding: binary {\rtf1
\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0
\fnil\fcharset0 MS Shell Dlg 2;}} {\colortbl ;\red0\green0
\blue0;} {\*\generator Msftedit 5.41.15.1515;}\viewkind4
\uc1\pard\tx720\cf1\f0\fs20 hi ryan\par }
------=_NextPart_015_0536_0032403C.48C36A48--
This is a multi-part message in MIME format.
------=_NextPart_005_0057_26846265.F5C90844 Content-Type:
text/plain; charset=UTF-
8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9A
EIAYQB0AGEAbgBnADsAIABFAEYAPQA7ACAAQwBPAD0AMAA7ACAAQwBTAD0AM
AA7ACAAUABGAD0AMQAyAAoADQAKAA0A Content-Transfer-Encoding:
binary it was some thing from 1130 to 330
------=_NextPart_005_0057_26846265.F5C90844 Content-Type:
text/rtf Content-Transfer-Encoding: binary {\rtf1
\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman
\fprq2\fcharset0 Batang;}} {\colortbl ;\red0\green0\blue0;}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard
\tx720\cf1\f0\fs20 it was some thing from 1130 to 330\par
} ------=_NextPart_005_0057_26846265.F5C90844--
I gathered this help from somewhere elese on the forum:
I could build a query like this
"split(split('{dbo.messages.body}', ' fs20')
[2],'\par}')[1]", however that would just get me the text.
I'd like the RTF format, so that if it's green, I see green! I know it's RTF format, because If I make a doc in wordpad, save as rtf, it looks like this if opened in notepad.
"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0
\fnil\fcharset0 MS Shell Dlg 2;}} {\colortbl ;\red0\green0
\blue0;} {\*\generator Msftedit 5.41.15.1515;}\viewkind4
\uc1\pard\tx720\cf1\f0\fs20 hi ryan\par }"
Any ideas? I need to extract it, and then somehow convert it. However, maybe there's a way to convert the whole kit and kaboodle?
Thanks,
Henry