Can I insert any files into a blob varbinary and then use bcp to export the file..
I have experimented a bit with this:
CREATE TABLE data(data varbinary(max));
INSERT INTO data(data)
SELECT * FROM
OPENROWSET(BULK 'c:\test\highres.wmv', SINGLE_BLOB) as f;
declare @cmd varchar(512);
SET @cmd =
'bcp "SELECT data FROM test.dbo.data" queryout c:\test\001.wmv -T -N -S servername';
EXEC xp_cmdshell @cmd;
The problem is, that the file is corrupted and cannot be viewed after bcp..
Please help