I am doing data integration from SQL Server 2008 R2 to PostgreSQL 9.5.
I have table with following details:
Table : In SQL Server
create table test
(
cola int,
colb numeric(18,0),
colc varchar(50),
cold datetime,
cole bit,
colf char(1)
);
Table : In PostgreSQL
create table test
(
cola int,
colb numeric(18,0),
colc varchar(50),
cold timestamp(0),
cole boolean,
colf char(1)
);
Package details:
Source : OLE DB Source (SQL Server)
Data Conversion : On column colc
to DT_WSTR
Destination : ADO NET Destination (PostgreSQL)
Error Details:
[ADO NET Destination [129]] Error: An exception has occurred during data insertion, the message returned from the provider is: Unable to cast object of type 'System.Decimal' to type 'System.Char[]'.
Sample Data: In SQL Server
insert into test1 values(1,NULL,'z','2017-02-12 12:21:50.000',1,'C');
insert into test1 values(2,1344,'Xuz','2017-02-12 12:21:50.000',0,'D');
insert into test1 values(3,NULL,'T','2017-02-12 12:21:50.000',1,'E');
Input and Output properties :
Your column mapping looks fine, you have to check your columns data type using the advanced editor.
Right click on Ado.net Destination
--> Input and Output Columns
Tab --> check that columns data type are defined correctly.
Side Note: Why converting colb
if it is a numeric column
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.