February 28, 2019 at 2:14 am
Hello Folks.
In a table are stored over 1 million ODBC documents (doc, pdf, excel ). I want to write all this documents on to disk in the correct format. The format is given by an attribute in the table. So I can identify the format by this id. My problem is to find a writing method in SQL Server, which allows me to write the right format.
Although I found this: EXEC sp_OACreate 'ADODB.Stream', I did not find a method to write the file in the right format.
Can anibody help?
Regards
Alphanew
February 28, 2019 at 5:00 am
do you have all three elements needed, the binary image, the filename and extension in your table?
SQL Server itself does not have tools for sending data to files, you need to use something outside of SQL server.
so using the adodb.stream example is one way, powershell, ssis, a programming language.
here's an article that has an SSIS package you could modify that does what you are asking:
https://www.mssqltips.com/sqlservertip/2693/export-images-from-a-sql-server-table-to-a-folder-with-ssis/
Lowell
February 28, 2019 at 6:24 am
Thanks for helping.
I will have a look.
Greetings
Alphanew
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply