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.
A:
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.
RandyMorris
2010-05-13 14:24:31
Thanks! I'll investigate that.
Anthony Faull
2010-05-13 15:15:17