开发者

concatenating 2 rtf fields stored in blobs with a sql script

I need to concatenate 2 rtf fields stored in 2 separate blob columns (actually they are nvarbinary(max) in sql server).

I need to do this with a database script, not in an application.

Is there a way? Or the only solution is to remove all the rtf headers, concatenate the "body" of the 2 fields and then recreate the headers?

By headers I mean

\rtf1\ansi\ etc...
开发者_运维知识库


If you can cleanly remove the headers and fix any CRC/length issues, then a simply string concat (which is valid for binary types too) will do it

eg

NewFixedHeader + HeaderlessnNarbinarymaxcolumn1 + HeaderlessNvarbinarymaxcolumn2

Although, this isn't really a SQL thing at all...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜