Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Shaka De Virgo
Starting Member
3 Posts |
Posted - 2012-09-19 : 19:23:39
|
I wasn't sure if this post should go here, but here we go...I'm using SQL Server 2012. I have a table where we are storing RTF data in one of the columns.Now we have to convert this RTF data and store the "plain text" in a new table.I have checked other posts I found in this website (http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=89973, http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90034, http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=123437, http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=178760), but unfortunately these solutions haven't really removed all the RTF tags from the source code.In our current setup, using an external control (like "RICHTEXT.RichtextCtrl") is not an option. Everything should be done using an SQL function / stored procedure.Could anyone help me tackle this? I can provide a couple of good examples of our RTF code, and how the text looks like after using the conversion method posted by lionofdezert and SwePeso in the mentioned posts above.thanks. |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-09-20 : 01:47:55
|
Ok, could you supply some example of RTF code and intended resultsJack Vamvas--------------------http://www.sqlserver-dba.com |
 |
|
Shaka De Virgo
Starting Member
3 Posts |
Posted - 2012-09-20 : 07:59:51
|
I have a file that I can send but honestly I don't know if I can attach it here, or how (I can't find a way to do that yet)... Could you give me some hints?Thanks! |
 |
|
Shaka De Virgo
Starting Member
3 Posts |
Posted - 2012-09-20 : 08:10:34
|
While I find a way to attach a file to my post, here you go (I copied / pasted from the *.txt file I have ready to attach).{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 MS Sans Serif;}{\f1\fnil\fprq2\fcharset0 MS Sans Serif;}}{\colortbl ;\red0\green0\blue0;}\paperw12240\paperh15840\margl1800\margr1800\margt1440\margb1440\viewkind4\uc1pard\qc\cf1\f0\fs20 I'll take a walk outside\parI'm surrounded by some kids at play\parI can feel their laughter\parSo why do I sear?\cf0\f1\fs15\par\cf1\f0\fs20\parPoor and twisted thoughts that spin around my head\parI'm spinnin'\parI'm spinnin' how quick the sun can drop away\par\parAnd now my bitter hands\parCradle broken glass\parOf what was everything\par\par\i All the pictures have been washed in black\parAnd tattooed everything\parAll the love gone bad \parHas turned my world to black\parAnd tattooed all I see\par\parAll that I am\parAll that I'll be\cf0\i0\f1\fs15\par} I'll take a walk outsideI'm surrounded by some kids at playI can feel their laughterSo why do I sear?Poor and twisted thoughts that spin around my headI'm spinnin'I'm spinnin' how quick the sun can drop awayAnd now my bitter handsCradle broken glassOf what was everythingAll the pictures have been washed in blackAnd tattooed everythingAll the love gone bad Has turned my world to blackAnd tattooed all I seeAll that I amAll that I'll be |
 |
|
|
|
|