Search This Blog

Tuesday, September 14, 2010

Insert File in SQL Server table


INSERT INTO dbo.Files (FileName, [File])
SELECT 'MyDoc.doc' AS FileName, *
FROM OPENROWSET(BULK N'C:\MyDoc.doc', SINGLE_BLOB) AS [File]

No comments:

Post a Comment