views:

34

answers:

1

I have a question about this query on inserting.

INSERT INTO BLOBTest
 (BLOBName, BLOBData)
 SELECT 'First test file', 
  BulkColumn FROM OPENROWSET(
   Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB

It works great, but my question is how do I insert more than one image at a time? I have a directory that has 1000+ images I need to insert. They are all named in order (image0001, image0002, etc...) Any assistance is greatly appreciated.

+1  A: 

The following two links will provide you with the information that you need to do this.

http://social.msdn.microsoft.com/forums/en-us/transactsql/thread/AEADA520-C989-4025-8CF3-085F0BFBD373

http://www.sqlservercentral.com/Forums/Topic469199-5-1.aspx

Waleed Al-Balooshi