Export of split image(varbinary(max)) from Progress to Sql

Dave_NGS

New Member
Please excuse my ignorance in regards to nomenclature here, I am brand new to Progress.
I need to pull some data from a progress database (Openedge 10.2) in which the table is storing Binary image files and move it into a SQL . The files are split off into multiple chuncks. From what I have learned in the original GUI they are pulled out of the database and then reconstructed using a "PUT" function in the original interface.

I have been provided this data in a sql table that is designed as such:
Table name ImageTable

file_id (int)
file_seq (int)
file_data (varbinary(max)

There are multiple file_id's, these are then sorted by the file_seq, the file_data holds the chuncks of the image.

12345, 1, chunk
12345, 2, chunck
12345, 3, chunck

I need to concatentate the binary chuncks into a single chunck and then move it into a separate table with the file_id column of 12345 and the combined chuncks creating the entire binary (jpg's).
 

TheMadDBA

Active Member
So you are trying do this against Progress or do you already have the data in another SQL based DB?
 

Dave_NGS

New Member
The data has already been pulled form the progress database and it is now in a SQL database in that split configuration. I do have access to the Progress database but I know very little about it and would probably have a better chance handling this within sql as it is. That Progress database is also still in Production mode so I really want to avoid interacting with it if possible.
 

TheMadDBA

Active Member
You will need to use T-SQL,PL-SQL or some other client (java,.net,etc) to concatenate the values by grouping the data by file_id and ordering by file_seq.

I can't think of any pure SQL method to do this.. especially not the actual writing of the files.

You might have better luck at one of the forums for the SQL DB you actually have the data in now.
 
Top