2017-11-14 13 views
0

다음과 같은 문제점이 있습니다.SSIS를 사용하여 datetime 값을 IBM AS/400 라이브러리/시스템의 테이블에있는 datetime 열에 삽입하십시오.

MS SQL 서버 데이터베이스의 테이블에서 AS/400 라이브러리의 테이블로 값을 삽입하는 SSIS 플로우를 만들고 싶습니다.

이 값은 datetime2 값을 제외한 모든 값에 적용됩니다. datetime2 값과 varchar 값을 datetime2 형식으로 삽입하려고했습니다. 두 가지 방법 모두 작동하지 않았습니다.

그것은 다음과 같은 오류를 제공합니다 :

[TABLENAME [11566]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "IBMDA400 Command" Hresult: 0x80004005 Description: "CWBZZ5014 Value of parameter COLUMNNAME could not be converted to the host data type.". An OLE DB record is available. Source: "IBMDA400 Command" Hresult: 0x80004005 Description: "CWBZZ5014 Value of parameter COLUMNNAME could not be converted to the host data type.".

[TABLENAME [11566]] Error: There was an error with input column "COLUMNAME" (12245) on input "OLE DB Destination Input" (11579). The column status returned was: "The value could not be converted because of a potential loss of data.".

누군가가이 작업을 수행하는 방법을 알고 있습니까?

+0

을 시도하려는 어떤 목표 컬럼 데이터 유형입니까? – mustaccio

+0

길이가 26이고 타임 스탬프가 26입니다. 형식은 다음과 같습니다. 2016-12-16-11.30.58.161468 – chr1s84

답변

2

나는 SQL 스크립트에서 변환이 IBM의 대상 열을 매핑하는 더 좋은 방법 일 수 있다고 가정 해보십시오.

CONVERT(TIMESTAMP, @DateTimeVariable) 또는

사용 derived column 표현이 사용 data conversion에 의해.

나는 db_timestamp

데이터 변환

enter image description here

+0

규모 6의 DT_DBTIMESTAMP2가 사용되었습니다. 감사 – chr1s84