views:

25

answers:

1

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
Thanks! I'll investigate that.
Anthony Faull