|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 3:14 AM
Points: 345,
Visits: 503
|
|
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
-- Sabya
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 4:31 AM
Points: 11,648,
Visits: 27,762
|
|
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
--There is no spoon, and there's no default ORDER BY in sql server either. Actually, Common Sense is so rare, it should be considered a Superpower. --my son
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 3:14 AM
Points: 345,
Visits: 503
|
|
Maybe it too let to acknowledge - but better late than never. Thank you - it worked.
-- Sabya
|
|
|
|