Dear All, I have another issue. I have in the SQL table Employees. This table has lot of details but I was missing images or photos.
So i managed to take all pictures for all employees but I have the pictures in the folder. Each picture is named like an Employee_id which matches the record in the table. How do I import images into SQL Employee table to match the name of the picture to Employee_id.
Any ideas?
You can use
OPENROWSET BULK
to open an external file as a value for anINSERT
orUPDATE
.Here's an example:
A cursor and a bit of dynamic SQL should do the trick.