sql server - How to make SSIS truncate numeric field in Flat File Destination -
i'd advice handling truncation issues in ssis. have column col1 money
in table. i'd output text file (fixed width, ragged right). in output file, column holds col1 must 8 characters wide.
in oledb data source, col1 specified as:
currency [dt_cy]
in both external columns , output columns tab.
in flat file connection manager's advanced tab, col1 specified as:
currency [dt_cy]
, inputcolumnwidth
set 8.
if populate col1 123456789.00 , execute task, oledb source succeeds , passes rows destination, task fails :
error: 0xc02020a1 @ dft_test, ffdest_test [3955]: data conversion failed. data conversion column "col1" returned status value 4 , status text "text truncated or 1 or more characters had no match in target code page.".
error: 0xc02020a0 @ dft_test, ffdest_test [3955]: cannot copy or convert flat file data column "col1".
i want avoid these truncation errors. in error output of source, change truncation property col1 fail component ignore failure. have expected resolve issue, executing task still gives same error.
can give guidance how make ssis truncate column 8 charactes?
use derived column
task create column 8-character string , populate money
column. in destination component, map derived column
col1 destination instead of original column.
or, better, in source component, use sql query converts money column varchar(8) or char(8) column.
Comments
Post a Comment