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...
精彩评论