April 9, 2009 at 10:15 am
Hi,
We have a table that stores html email templates in varbinary(max) column. We are inserting the html file as follows:
INSERT INTO ..
SELECT emailtemplate.BulkColumn,..
FROM OPENROWSET(BULK 'C:\Email\generic_email_template.txt',
Single_Blob) AS emailtemplate, ...
Is there anyway - we can 'see' the content once it's loaded through executing a query/stored procedure?
Thanks in advance.
Sabya
[font="Comic Sans MS"]--
Sabya[/font]
April 9, 2009 at 10:38 am
since HTML is text, i would have used a varchar(max) column instead of varbinary(max)
you can convert to NVarchar(max) to see the contents.
select CAST(YourVarbinaryColumn as nvarchar(MAX)) From YourTable
Lowell
November 19, 2009 at 12:46 pm
Maybe it too let to acknowledge - but better late than never. Thank you - it worked.
[font="Comic Sans MS"]--
Sabya[/font]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply