使用SQL Server/SSIS数据导入向导导入Varbinary(max)数据? [英] Import Varbinary(max) data using SQL Server/SSIS Data Import Wizard?

查看:56
本文介绍了使用SQL Server/SSIS数据导入向导导入Varbinary(max)数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果表包含varbinary(max)列,是否甚至可以仅使用SSMS或SSIS导入/导出向导将.csv平面文件数据导入到SQL Server 2014表中?

我搜索了几个小时,并尝试在SSMS和SSIS导入/导出向导中尝试多种配置和不同的数据类型(例如DT_IMAGE),以将.csv文件数据简单,快速地导入n.四列表,其中包含SQL Server中的varbinary(max)列.

我意识到,还有许多其他方法可以通过编写Trans SQL,使用大容量复制,添加列导入任务等来实现此目的,但是我很难相信我不能使用简单的point-n.单击导入/导出向导"的配置,仅因为数据碰巧包含一个varbinary(max)字段,所以我认为我一定做错了.

下面是SSMS导入/导出向导的屏幕截图...我在SSMS和SSIS中都遇到相同的错误:

解决方案

您可以使用DT_TEXT ANSI/MBCS字符串,最大长度为2 ^ 31-1(2,147,483,647)个字符.

我使用了您提供的样本数据并将其导入数据库中.

Is it even possible to import .csv flat file data into a SQL Server 2014 table using only the SSMS or SSIS Import/Export Wizards, if the table contains a varbinary(max) column?

I have searched hours and hours, and tried numerous configurations and different data types (e.g. DT_IMAGE) in both the SSMS and SSIS Import/Export Wizards to perform a simple, quick-n-dirty import of .csv file data into a four column table containing a varbinary(max) column in SQL Server.

I realize there are various other means to accomplish this by writing Trans SQL, using bulk-copy, adding column-import tasks, etc., but I find it hard to believe that I can't use the simple point-n-click configuration of the Import/Export Wizard, simply because the data happens to contain a varbinary(max) field, so I assume I must be doing something wrong.

Below are screen shots from the SSMS Import/Export Wizard...I get the same error in both SSMS and SSIS:

解决方案

You can use DT_TEXT An ANSI/MBCS character string with a maximum length of 2^31-1 (2,147,483,647) characters. Integration Service Data types. It Will be varbinary(max) in database.

I have used the sample data provide by you and imported it in the database.

这篇关于使用SQL Server/SSIS数据导入向导导入Varbinary(max)数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆