April 2, 2013 at 3:38 am
I'm exporting Flat File to DB Table.
In Flat File I have numeric column with some values has empty space.
In Derived column I'm using " [Column 188] == " " ? "0" : [Column 188] " to make empty space as 0.
then In data conversion I'm converting it to float b'coz destination column is Float.
But I'm getting as errors as follows
[Data Conversion [3495]] Error: Data conversion failed while converting column "Derived Column 2" (6895) to column "Copy of Derived Column 2" (6901). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
[Data Conversion [3495]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "Copy of Derived Column 2" (6901)" failed because error code 0xC020907F occurred, and the error row disposition on "output column "Copy of Derived Column 2" (6901)" 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.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Data Conversion" (3495) failed with error code 0xC0209029 while processing input "Data Conversion Input" (3496). 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.
April 4, 2013 at 2:19 pm
I am intermediate SSIS programmer, but it looks like a data conversion issue to me.
If column 188 is a numeric, you have strings mixed into the equation.
[Column 188] == " " ? "0" : [Column 188]
My advice is to compare apples to apples.
The derived column conversion below converts every thing to a varchar(10).
(DT_WSTR, 10)[Column 188] == (DT_WSTR, 10)"" ? (DT_WSTR, 10)"0" : (DT_WSTR, 10)[Column 188]
Change according to your target field, which I am assuming is a varchar(10).
John Miner
Crafty DBA
www.craftydba.com
April 5, 2013 at 12:58 am
Thanks.
But Len[column 1]>0?[column 1]:0
This will clear the error converting to Float which has Empty space
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply