我在Oracle中具有以下SQL:
SELECT
CE.ENCNTR_ID AS CernerEncounterID
,TO_DATE(S.ACTIVE_STATUS_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS NoteStartDateUTC
,S.AUTHOR_ID AS CernerPersonID
,S.STORY_COMPLETION_STATUS_CD
,CE.EVENT_CD AS CernerNoteTypeCD
,TO_DATE(CE.VALID_FROM_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS VALID_FROM_DT_TM
,TO_DATE(CE.VALID_UNTIL_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS VALID_UNTIL_DT_TM
,CE2.EVENT_CD AS EVENT_CD
,TO_DATE(CE2.VALID_FROM_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS AuthVerifiedValidFromDate
,TO_DATE(CE2.EVENT_END_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS AuthVerifiedEventEndDate
,TO_DATE(CE2.PERFORMED_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS AuthVerifiedPerformedDate
,TO_DATE(CE2.VERIFIED_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS AuthVerifiedDate
,TO_DATE(CE2.CLINSIG_UPDT_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS AuthVerifiedClinSigUpdateDate
,CE2.AUTHENTIC_FLAG AS AuthVerifiedStatus
,CE.ENTRY_MODE_CD AS CernerEntryModeDisplayCD
,S.TITLE
,STORY_TYPE_CD
,S.EVENT_ID
,S.ACTIVE_STATUS_CD
,TO_DATE(S.ACTIVE_STATUS_DT_TM,'YYYY-MM-DD HH24:MI:SS') AS IncrementalDateTimeFlag
FROM
Table01 S
LEFT OUTER JOIN
Table02 CE
ON
S.EVENT_ID = CE.EVENT_ID
LEFT OUTER JOIN
Table03 CE2
ON
S.EVENT_ID = CE2.EVENT_ID
AND
CE2.RESULT_STATUS_CD = 25
WHERE
S.ACTIVE_STATUS_DT_TM >= TO_DATE('2019-06-20 00:00:00','YYYY-MM-DD HH24:MI:SS')
它在Oracle SQL Developer中运行没有任何问题。
在SSIS中执行将产生以下错误:OLE DB记录为 可用。来源:“ OraOLEDB”结果:0x80004005说明: “ ORA-01840:输入值不足以用于日期格式”。
到目前为止,我一直在寻找信息,直到死胡同。 你能请好建议吗?