Some functions for Microsoft SQL Server
Function | Description |
---|---|
Unzip | Unzip binary data |
SELECT master.dbo.Unzip(MyVarBinary) FROM MyTable;
SELECT CAST(master.dbo.Unzip(MyVarBinary) as Xml) FROM MyTable;
I prefer install this dll to master db because of accesing in any db.
Load SqlCrl.dll to SQL Server db from Programmability > Assemblies
Run below command in master.
CREATE FUNCTION Unzip(@Input varbinary(max)) RETURNS varbinary(max)
AS EXTERNAL NAME [SqlCrl].[Zip].Unzip;
sp_configure 'clr enabled', 1;
RECONFIGURE
Jaime Olivares for ZipStorer http://github.com/jaime-olivares/zipstorer