Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Import jpg

Author  Topic 

christosds
Starting Member

10 Posts

Posted - 2013-03-01 : 09:32:39


Hello guys
I have 2 tables MTRL contains products and XTRDOCDATA contains extra info of the products and the image of the product in to SODATA field.

The relationship between the 2 tables is one product row MTRL to one extra info row XTRDOCDATA where MTRL.MTRL=XTRDOCDATA.REFOBJID

I have also some .jpg images stored on a local drive folder. The names of the images are [string].jpg

Is it possible to import the images in to the XTRDOCDATA.SODATA field
when the name of the image is the same with the values of the MTRL.CODE2 field.

For example if the CODE2 value of one product is 026546565 and there is a photo with name 026546565.jpg to import the photo into the XTRDOCDATA.SODATA field where the XTRDOCDATA.REFOBJID field of this row is the same with the MTRL.MTRL of the product that has the CODE2 value of 026546565.

Thank you in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-03-01 : 12:46:22
see

http://sqlserver-suresh.blogspot.in/2011/08/inserting-image-file-using-openrowset.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -