May 26, 2015 at 12:49 pm
Hi,
I have table which consists of images. I am trying to export those images to a folder.
declare @path varchar(100)= 'c:\images\'
SELECT [PICTURE]
,@path+[PICTURE] AS Path
FROM [A].[dbo].[PICTURE]
I am getting this error: The data types varchar and varbinary(max) are incompatible in the add operator.
Thanks in advance.
May 26, 2015 at 12:58 pm
PJ_SQL (5/26/2015)
Hi,I have table which consists of images. I am trying to export those images to a folder.
declare @path varchar(100)= 'c:\images\'
SELECT [PICTURE]
,@path+[PICTURE] AS Path
FROM [A].[dbo].[PICTURE]
I am getting this error: The data types varchar and varbinary(max) are incompatible in the add operator.
Thanks in advance.
Okay, so you want to export the images to a given folder. That's great, but it appears that your images aren't just filenames pointing to some existing file. They are actual binary data, contained in a varbinary field. As we don't have any idea what the original image source file names are, you'll have to check your PICTURE table to see if any of that information is available. Assuming that it is, you could then use a SCRIPT task to actually output each record's data into an actual file using VB (or C#). I don't have enough exposure to SSIS to know if it has any tasks that could export image data from a varbinary field into a file. You might also want to know how those images were imported in the first place, as that might make the export a lot easier. Also, you're going to need to know what file format the data came from originally, so that you can use the right filename extension for the exported file. Does that help?
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply