Friday, May 14, 2010

SQL Server :: Storing Images and BLOB files

  1. Insert BLOB 

    INSERT INTO BLOBTest (BLOBName, BLOBData)  

     SELECT 'First test file',    

      BulkColumn FROM OPENROWSET(Bulk 'C:\temp\nextup.jpg', SINGLE_BLOB) AS BLOB 


 

http://www.databasejournal.com/features/mssql/article.php/3724556/Storing-Images-and-BLOB-files-in-SQL-Server-Part-2.htm


 

  1. Export BLOB 

    bcp "select datei from Person.Address WHERE
    addressid=1 " queryout "c:\TestOut.doc" -T -n -Slocalhost\AdventureWorks

http://www.sqlservercentral.com/Forums/Topic487470-338-1.aspx

No comments: