用SSIS从SQL导数据到ORACLE出现错误,从错误上看是float数据类型的问题。
错误:The data type could not be assigned to the column "USER_ID" in "Oracle Provider for OLE DB".
建表语句:
SQL:
CREATE TABLE [dbo].[gc_account](
[ID] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[USERTYPE] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[USER_ID] [decimal](12, 0) NOT NULL,
[LOGIN_NAME] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[USER_NAME] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[REMARK] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[CONFIRM_REMARK] [nvarchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
CONSTRAINT [PK_gc_account] PRIMARY KEY CLUSTERED
(
[USER_ID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
ORACLE:
CREATE TABLE GC_ACCOUNT ( ID VARCHAR2(255 CHAR) NULL, USERTYPE VARCHAR2(255 CHAR) NULL, USER_ID FLOAT(15) NOT NULL, LOGIN_NAME VARCHAR2(255 CHAR) NULL, USER_NAME VARCHAR2(255 CHAR) NULL, REMARK VARCHAR2(255 CHAR) NULL, CONFIRM_REMARK VARCHAR2(255 CHAR) NULL, CONSTRAINT PK_GC_ACCOUNT PRIMARY KEY (USER_ID));
如上建表语句,现在的问题是建好了表,从SQL导数据到ORACLE失败,问题出在FLOAT类型数据,有谁遇到过这样的问题,求帮助。
------解决方案--------------------Oracle里的GC_ACCOUNT表,USER_ID字段数据类型用number(12,0)试试..