﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / Query to import multiple image file to SQL server 2008 Database / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 01:56:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Query to import multiple image file to SQL server 2008 Database</title><link>http://www.sqlservercentral.com/Forums/Topic1382370-391-1.aspx</link><description>You could possibly create a SSIS package to load the data/images into your table using foreach elements.But this is really only worthwhile if this is going to be a recurring task (and possibly if the people who will be using the process prefer to use a graphical UI to apply changes to the script). It may also be useful for the point of view of metadata, logging etc as it is (for the most part) built into SSIS - i.e. it's relatively straightforward to add logging into a SSIS package, whilst the pure T-SQL approach would require you to built your logging mechanisms - the same applies to some extent to the error handling.Additionally, SSIS uses memory quite efficiently so that may be a benefit.But if your ETL is mostly E and L (or just Load in your case), with very little T, and if you can write your SPs so they don't rely on cursors, then going the SP-only route will probably be fine.HTH,B</description><pubDate>Fri, 09 Nov 2012 04:55:41 GMT</pubDate><dc:creator>bleroy</dc:creator></item><item><title>RE: Query to import multiple image file to SQL server 2008 Database</title><link>http://www.sqlservercentral.com/Forums/Topic1382370-391-1.aspx</link><description>Thank you very much for your reply.Could you explain more about the SSIS solution possibilities?</description><pubDate>Fri, 09 Nov 2012 03:05:53 GMT</pubDate><dc:creator>assefam</dc:creator></item><item><title>RE: Query to import multiple image file to SQL server 2008 Database</title><link>http://www.sqlservercentral.com/Forums/Topic1382370-391-1.aspx</link><description>Have a look at this:[url]http://www.sqlservercentral.com/blogs/practicalsqldba/2012/03/15/importing-images-to-sql-server-database-using-t-sql/[/url]In your case, you may want to adapt it slightly to match your KeyID with image name, but it should get you started.Also check if you can implement a SSIS solution instead.Also refer to forum post:[url]http://www.sqlservercentral.com/Forums/Topic1066764-391-1.aspx[/url]HTH,B</description><pubDate>Thu, 08 Nov 2012 03:43:10 GMT</pubDate><dc:creator>bleroy</dc:creator></item><item><title>Query to import multiple image file to SQL server 2008 Database</title><link>http://www.sqlservercentral.com/Forums/Topic1382370-391-1.aspx</link><description>I have a database with different tables. one of these tables has an image column more than  50, 000 records.I have  also 40,000 image files in a separate folder C:\ImageFolder  with file names the same as primary Key values of the record in the table.[b]Question: [/b]How can I insert these multiple image file from  C:\ImageFolder   to the corresponding record in the image column.E.g. Table Name [b]SampleTable (Col_PK, Name,Picture) [/b]with sample data (four records)[code="other"][b]Col_PK	       Name	   Picture1001            XXX        NULL1002	        YYY	   NULL1003	        ZZZ	   NULL1004	        ddd	   NULL[/b][/code]C:\ImageFolder -- has the following three image files	1001.png, 1002.png , 1004.png[b]Remark:[/b] Size of each file is less than or equal to 50KB and will be stored in the database as binary fileHow  to import image file: 1001.png -&amp;gt; To  Record  with Col_pk=10011002.png -&amp;gt; To  Record  with Col_pk=10021004.png -&amp;gt; To  Record  with Col_pk=1004</description><pubDate>Thu, 08 Nov 2012 03:32:01 GMT</pubDate><dc:creator>assefam</dc:creator></item></channel></rss>