Just Code‎ > ‎

TSQL Insert file into database from script

posted Jan 13, 2010, 2:31 AM by Peter Henell
insert into t_file (c_name, c_binary) 
select 'Test.txt', BulkColumn FROM OPENROWSET(
           Bulk 'C:\test.txt', SINGLE_BLOB) AS IMAGE
Comments