フラットファイルから2つの列を新しいテーブルにインポートするだけです。私は1つの列「コード」をvarchar(50)
に設定し、別の列「説明」をnvarchar(max)
に設定しました。SQL Serverインポートウィザードが理解できないメッセージで失敗する
インポートは、次のメッセージで失敗します。
- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Description" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)
Error 0xc020902a: Data Flow Task 1: The "output column "Description" (14)" failed because truncation occurred, and the truncation row disposition on "output column "Description" (14)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
(SQL Server Import and Export Wizard)
Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\Users\rinaldo.tempo\Desktop\ICD10_Edition4_CodesAndTitlesAndMetadata_GB_20120401.txt" on data row 3.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - ICD10_Edition4_CodesAndTitlesAndMetadata_GB_20120401_txt" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
(SQL Server Import and Export Wizard)
エラーメッセージは、それがタイプnvarchar(max)
である[詳細]列に配置されていますように、データが切り捨てられてきていることを私に示唆しています!入力データに注目すると、記述は2〜300文字程度であるとは言えないので、これは疑問です。
誰でも何が間違っているとお考えですか?
ああ、最初の作業は、これがコードページの変換の問題であることを明確にしています。 ASCII以外の文字をASCII文字列で保存する – TomTom
あなたは今ハーブされています。 SSISの痛みへようこそ。インポートのために、この単純な 'bcp'を試してください。 – ErikE
私は、誰かが私の愚かな小さなスワイプをインポートウィザードで削除すると思ったが、代わりに私はupvotedされている。 :D – David