2012-01-27 460 views
2

iSeriesシステムからSQL Serverにデータをエクスポートするために使用するSSISエクスポート・パッケージがあります。私はパッケージに新しいテーブルのエクスポートを追加しています。このテーブルには2つの日付フィールドがあります。私のSSISパッケージはODBC経由でiSeriesデータベースに接続します。私はMS Accessで問題なくエクスポートするデータテーブルに接続することができ、何の問題もなくすべてのデータを参照して表示することができます。しかし、私は日付フィールドにSSISからの"Invalid character value for cast specification"というエラーメッセージが表示されています。SSISで「キャスト仕様の文字値が無効です」原因の日付データ

特定の問題を診断するにはどうすればよいですか?私はかなりSSISでこのデータを変換する方法があると確信しています。私はMS Accessから元の状態でプレビューできないので、データを再フォーマットする方法はわかりません。私の質問はかなり一般的です - 私はこの問題を解決するか、問題を解決するために何ができますか?

ありがとうございました!参考までに、以下のデータは、タスクをテストするときのVisual Studioの完全なエラーの詳細です。

Error: 0xC0202009 at [iSeriesTable], [SSIS Task] [113]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. 
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification". 
Error: 0xC020901C at [iSeriesTable], [SSIS Task] [113]: There was an error with input column "date_field" (178) on input "OLE DB Destination Input" (126). The column status returned was: "Conversion failed because the data value overflowed the specified type.". 
Error: 0xC0209029 at [iSeriesTable], [SSIS Task] [113]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (126)" failed because error code 0xC020907A occurred, and the error row disposition on "input "OLE DB Destination Input" (126)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. 
Error: 0xC0047022 at [iSeriesTable]: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "[SSIS Task]" (113) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. 
Error: 0xC0047021 at [iSeriesTable]: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited. 

答えて

3

日付フィールドではなく、varchar()または他の文字列またはテキストタイプのフィールドに入れてみてください。一部のバックエンドでは、SQL Serverが直接処理できない日付を受け入れるため、インポート前に変換する必要があります。

+0

ああ、ありがとう。それはとてもシンプルで、私はそれについて考えなかったとは信じられません。フィールドをキャストしてデータをエクスポートした後、問題がわかり、データを日付フィールドとして再作成できました。 – RLH

0

IBM i表の列が、ZONED、PACKEDまたはINTEGERではなくDATEとして定義されていることを確認してください。

+0

まず、どうすればいいでしょうか。次に、それが「日付」として定義されている場合はどうですか?私は、iSeriesシステムを制御することはできません。私が利用できる唯一のアクセスは、ODBC接続によるものです。 – RLH

関連する問題