Using TSQL to Unzip a value

放肆的年华 提交于 2020-01-24 19:17:42

问题


How can I unzip a varbinary(max) value in a stored procedure? I'd like to implement or invoke a gunzip algorithm within TSQL code, preferably without enabling the CLR.


回答1:


Look into sp_OACreate http://msdn.microsoft.com/en-us/library/ms189763.aspx

sp_oamethod http://msdn.microsoft.com/en-us/library/ms174984.aspx

You can write the value as a file using file system object, then use a command line gunzip program on it and the read the file using FSO back.

Yes this is not practical but I am not the type of guy who thinks in terms of impossible.



来源:https://stackoverflow.com/questions/2827459/using-tsql-to-unzip-a-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!