I have a table: Formats
with columns:
FileName,Document_binary,Format,UsedBy,Date and Id
Document column is VARBINARY(MAX).
There are some already loaded documents with names like: 0x504b34xxxx and so on, all of these are excel files that users can download from a site.
What I am trying to accomplish is to have this file formar, the file itself stored in the database for when a user needs the file go get it from the system as a download. Not the data contained in it but the file itself.
I need to do it manually without any interface.
I tried this below with no luck:
INSERT INTO Formats
(FileName, Document_binary,Format,UploadUser,UploadDateTime,Id)
values
('Case_Project', * FROM OPENROWSET(BULK 'C:\Users\jhon\Desktop\Worksheet
in 6W2H update Jul2018 formato std.xlsx'),
'Template','jhon.doe',NOW,22)
Thank you