Skip to content

Instantly share code, notes, and snippets.

@davidsheardown
davidsheardown / SQLblobToFile.sql
Created February 26, 2020 09:01
SQL blob/varbinary to file
/*
To directly add a file to blob
(this example was a 120mb file)
*/
INSERT INTO [dbo].[TableWithBlob](Id, ProductId, Filename, [ActualFile])
SELECT 1,1,'filename',BulkColumn
FROM OPENROWSET(BULK N'c:\clients\test.exe', SINGLE_BLOB) as AnyAliasFieldYouLike
/*
@cowboy
cowboy / HEY-YOU.md
Last active October 25, 2024 15:29
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.