English 中文(简体)
将文件上载到一个与Singk管理室相连接的硬体
原标题:Upload a file to a varbinary with SQL Management Studio

是否有办法将文件上载到一个与管理演播室一起,而不必打手打包。

最佳回答

OPENROWSET

实例

USE AdventureWorks2008R2;
GO
CREATE TABLE myTable(FileName nvarchar(60), 
  FileType nvarchar(60), Document varbinary(max));
GO

INSERT INTO myTable(FileName, FileType, Document) 
   SELECT  Text1.txt  AS FileName, 
       .txt  AS FileType, 
      * FROM OPENROWSET(BULK N C:Text1.txt , SINGLE_BLOB) AS Document;
GO
问题回答

简言之,使用服务器管理室(SSMS),第24号。

这些选择要么通过T-SQL完成你的任务,要么推出你自己的解决办法/申请。

利用服务器集成服务(SSIS)设计的解决办法也可能成为可能。





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签