SQL Server导入和导出向导中的源类型200? [英] Source Type 200 in SQL Server Import and Export Wizard?

查看:275
本文介绍了SQL Server导入和导出向导中的源类型200?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SQL Server导入和导出向导将数据从服务器中的一个数据库导入到另一台服务器中的新表中. (SQL Server Management Studio 2012)

I am trying to import data from one database in a server to a new table in a different server, using SQL Server import and Export Wizard. (SQL Server Management Studio 2012)

在向导中,我选中了编写查询以指定要传输的数据",并且SQL语句返回包含以下四列的数据:

In the wizard, I checked "Write a query to specify the data to transfer", and the SQL statement returns data containing the following four columns:

+-----------------------------------------------------------------------------+
| ID(varchar(100))  |  Title(text)  |  Description(text)  |  IsActive(tinyint)|
+-----------------------------------------------------------------------------+

我想将新表的类型更改为

I want to change the types for the new table to

+----------------------------------------------------------------------------------------+
| ID(varchar(4))  |  Title(varchar(200))  |  Description(varchar(2000))  |  IsActive(bit)|
+----------------------------------------------------------------------------------------+

因此,在列映射"页面中(在"选择源表和视图"页面中,单击了"编辑映射..."),将目标类型更改为上述类型. 然后,在单击下一步"之后,在查看数据类型映射"页面中,我收到一条错误消息,提示"Found 3 unknown column type conversion(s). You are only allowed to save the package"

So, in the "Column Mappings" page(In the "Select Source Tables and Views" page, I clicked "Edit Mappings..."), I changed the Destination Type to the above types. Then, after clicking "Next", in the "Review Data Type Mapping" page, I get an error that says "Found 3 unknown column type conversion(s). You are only allowed to save the package"

数据类型映射显示以下信息:

The Data type mapping shows the following information:

icon    Source Column    Source Type    Destination Column    Destination Type    Convert
----------------------------------------------------------------------------------
error   ID               200            ID                    varchar
error   Title            200            Title                 varchar
error   Description      201            Description           varchar
warning IsActive         tinyint        IsActive              bit    

即使我不更改"编辑映射... "页面中的数据类型,也会遇到相同的错误.

Even if I don't change the data type in the "Edit Mappings..." page, I get the same error.

我不明白在数据类型的上下文中"200"是什么意思,如何将这些数据导入到其他服务器中的新表中?

I don't understand what "200" means in the context of a data type, and how can I import this data to a new table in a different server?

感谢您的帮助.

推荐答案

经过一些实验,仅当您将查询作为源时,才会出现此错误.接受的答案对我不起作用,因为复制到平面文件将导致相同的错误.

With a bit of experimentation this error only seems to occur when you have a query as the source. The accepted answer did not work for me as copying to a flat file would result in the same error.

为解决此问题,我将查询放入View,然后选择了Copy From one or more Tables Or Views而不是Write a query....

To solve this I put my query into a View then selected Copy From one or more Tables Or Views instead of Write a query....

此后,我正常通过了该向导,并且我的数据没有出现错误

I went through the wizard normally after that and my data went through with no error

这篇关于SQL Server导入和导出向导中的源类型200?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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