繁体   English   中英

从PostgreSQL到Sql Server 2008的表传输

[英]Postgresql to Sql Server 2008 Table Transfer

我正在使用postgresql(Pgadmin版本1.18.0),我使用查询将三个(我只需要3个表)表(包含在线交易信息)数据导出为csv格式

copy to 'D:\orders\new\users.csv' DELIMITER ';' CSV HEADER

使用查询,我得到了完美的结果。 现在,我打开ssms(Sql Server 2008),并使用“导入和导出数据”选项,通过使用“平面文件服务数据源”将users.csv文件导入到sql server 2012。 最后,当我单击“完成”按钮时,它会引发以下错误消息

--Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for 
column "address" returned status value 4 and status text "Text was truncated or one or 
more characters had no match in the target code page.".

 (SQL Server Import and Export Wizard)

--Error 0xc020902a: Data Flow Task 1: The "Source - users_csv.Outputs[Flat File Source 
Output].Columns[address]" failed because truncation occurred, and the truncation row 
disposition on "Source - users_csv.Outputs[Flat File Source Output].Columns[address]" 
specifies failure on truncation. A truncation error occurred on the specified object 
of the specified component.
 (SQL Server Import and Export Wizard)


--Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The 
PrimeOutput method on Source - users_csv returned error code 0xC0202092.  The    
component returned a failure code when the pipeline engine called PrimeOutput(). The 
meaning of the failure code is defined by the component, but the error is fatal and 
the pipeline stopped executing.  There may be error messages posted before this with 
more information about the failure.

 (SQL Server Import and Export Wizard)

请帮帮我。 抱歉,如果不清楚。

感谢您的期待。

问候,Keerthi

您的数据大小超过了字段大小。 扩展目标表中地址字段的大小。 如果仍然出现错误,请检查“导入和导出向导”中的“高级”选项。 您可以在那里设置每个列的OutputColumnWidth。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM