mysql - 由于执行前错误 0xc020802e,我无法将 CSV 导入 Microsoft SQL Server Management Studio 2014

标签 mysql sql-server csv

我正在尝试将 CSV 文件导入 SQL Server Management Studio 2014,但每次尝试时都会遇到错误。具体来说,我收到预执行错误:

Messages Error 0xc020802e: Data Flow Task 1: The data type for "Source

download_fresh_filename_com_06_Apr_17_4EB41F5D720E569B7AD1D854B1EC3142_csv.Outputs[Flat File Source Output].Columns[Target URL]" is DT_NTEXT, which is not supported with ANSI files. Use DT_TEXT instead and convert the data to DT_NTEXT using the data conversion component. (SQL Server Import and Export Wizard)

Error 0xc0202094: Data Flow Task 1: Unable to retrieve column information from the flat file connection manager. (SQL Server Import and Export Wizard)

Error 0xc004701a: Data Flow Task 1: Source - download_fresh_filename_com_06_Apr_17_4EB41F5D720E569B7AD1D854B1EC3142_csv failed the pre-execute phase and returned error code 0xC0202094. (SQL Server Import and Export Wizard)

Information 0x4004300b: Data Flow Task 1: "Destination - download_fresh_filename_com_06_Apr_17_4EB41F5D720E569B7AD1D854B1EC3142" wrote 0 rows. (SQL Server Import and Export Wizard)

CSV 为 UTF8 编码,约 114,900 行 20 列。到目前为止,这是我尝试过但没有成功的方法:

  • 在“选择数据源”>“高级”下,我已将数据类型设置为 [DT_TEXT],但这不起作用,
  • 尝试了 [DT_NTEXT] 但仍然没有用。
  • 在检查数据类型映射下,我已将 On Error (global) 设置为 Ignore,但仍然无效

如有任何帮助,我们将不胜感激。

谢谢。

最佳答案

您可以尝试使用有限数量的行来缩小具有恶意值的行的范围。 此外,虽然听起来很有趣,但在这种情况下,我通过先将其导入 Excel,然后再导入 SQL Server 获得了更好的成功。在其他情况下,到 Excel,再到 Access,再到 SQL Server。陌生的世界。

关于mysql - 由于执行前错误 0xc020802e,我无法将 CSV 导入 Microsoft SQL Server Management Studio 2014,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43252149/

相关文章:

Mysql查询Left Join条件问题

mysqlimport - 在 MS Windows XAMPP 环境中导入 CSV 文件

sql-server - 无法绑定(bind)多部分标识符

sql-server - symfony 项目和 MS SQL 后端出现 OFFSET 错误

c# - 如何使用 Entity Framework Core 进行全文搜索?

mysql - 计算 MySQL 表中时间戳内的天数

php - 登录系统中 undefined variable session

c - 在 C 中读取 .csv 文件

ruby-on-rails - Ruby - ActiveAdmin CSV 自定义导入

python - 在Python中解析HTML上传的CSV文件