Creating RTF data from varchar data

  • Hello,

    I am migrating data from our legacy database to SQL 2005 and I need to convert plain varchar data to rtf data. Has anyone ever accomplished this in puer t-sql. Thanks for your assistance.

  • Have you tried storing the RTF data as varbinary documents in the first place?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Hello,

    Thanks for your response. A little more background. I was given this assignment because I am a C# programmer and part of an existing migration process includes C# code to process extracted data from a legacy DB. The current management wants to convert the C# code to SQL. The last remaining piece involves converting legacy varchar plain text data to rtf data. The C# code accomplished this by assigning the plain text data to a richtextbox control which wrapped the plain text in the rich text format and then inserting the new rich text formatted data into the new DB. I need to accomplish the same thing in T-SQL only. Please advise. Thanks again.

    Regards

  • Have you looked into the possibility of using a CLR to accomplish that? I don't know if it's possible, but it might be. Would at least appear to parallel your prior solution.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply