标签: sql sql-server sql-server-2008-r2
有没有办法在我存储的varbinary列中获取文件的内容,例如.doc和.pdf文件。我可以成功阅读插入的.txt,而pdf和doc不可读
varbinary
SELECT CAST(CAST(SUBSTRING(Docs, 3, LEN(DOCS)) AS VARBINARY(MAX)) AS VARCHAR(MAX)), ID, fileextension FROM dbo.documents WHERE CONTAINS(docs, 'brand')