2016-05-23 14 views
0

私は、このデータが含まれたCSVファイルを持っている:SSISのデータの読み込みエラー

EmployeeCode,EmployeeName,EmployeeSalary,Date 
101,raju,1000,2/2/2003 
102,krish,100,3/4/2005 
103,rishbh,320,12/9/2007 
104,rani,4690,12/8/2008 
105,olesia,2000,17/4/2009 
106,olga,2000,12/6/2010 
107,mellisa,3330,12/4/2011 

をそして私はテーブルと呼ばれる従業員を持っている:私はこのCSVを使用して私のテーブルにファイルをロードしようと

EmployeeCode nvarchar(50) 
EmployeeName nvarchar(50) 
EmployeeSalary money 
Date datetime 

SSISパッケージでエラーが発生する

1) [ADO NET Destination [2]] Error: An exception has occurred during data insertion, the message returned from the provider is: The given value of type String from the data source cannot be converted to type date of the specified target column.

2) [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ADO NET Destination" (2) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (9). 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.

ただし、CSVから日付列を削除して事はうまくいく。何が日付列に間違っている、なぜ値を取っていないのですか?

+0

_データソースからのString型の指定された値を、指定したターゲット列の型日付に変換できません._列型の日付を 'DT_STR'(または' DT_WSTR')の型からデータデータの1つに変換していますか?タイプ?もしそうなら、派生した列の変換を使って、それをどうやって投稿してください? –

答えて

0

使用OLE DB Destinatio n個ではなく、ADO NET先

この問題が原因フラットファイルのデフォルトのデータ型にあるが、データベース内のvarchar型に等しいですが、「文字列[DT_STR]」を選択されます宛先テーブルのデータ型をにしました。nvarcharと等しくなります。Unicode文字列[DT_WSTR]

どちらの事前エディタ(ソース)>>入力と出力のプロパティ出力列>>データの種類を示すために、Unicode文字列[DT_WSTR]

または

行くために[DT_STR]派生列の変更データタイプ文字列を使用してプロパティ>>データ型をに変更します。EmployeeCodeとEmployeeNameのUnicode文字列[DT_WSTR]

+0

ターゲットデータ型は** date ** –

+0

ADO NET宛先...ではなくOLE DB宛先を使用..... –

+0

文字列を日付にロードしようとしているという事実をどのように変更しますか? –

関連する問題