January 7, 2009 at 12:21 pm
Hi there,
i got a problem with a Derived Column Item where a Flat File Source loads a Column from a flat file and redict it´s content to a Derived Column. The column has only text but it is to larg for DT_STR (8000) so i take DT_I1.
So when i configure the Derived Column in my Data Flow with the Transformation Editor in the Expression column a use this code --> REPLACE(["Column"],"";" ") to remove (;) but the string gets red with this error below! Have anyone an advise how to get the text column well tranformed? Maybe with TypeClass??
Error:
Error at Data Flow Task [Derived Column 1 [2683]]: The function "REPLACE" does not support the data type "DT_I1" for parameter number 1. The type of the parameter could not be implicitly cast into a compatible type for the function. To perform this operation, the operand needs to be explicitly cast with a cast operator.
Error at Data Flow Task [Derived Column 1 [2683]]: Evaluating function "REPLACE" failed with error code 0xC0047089.
Error at Data Flow Task [Derived Column 1 [2683]]: Computing the expression "REPLACE(["Leistungsbeschreibung"],""," ")" failed with error code 0xC00470C5. The expression may have errors, such as divide by zero, that cannot be detected at parse time, or there may be an out-of-memory error.
Error at Data Flow Task [Derived Column 1 [2683]]: The expression "REPLACE(["Column"],""," ")" on "input column ""Column"" (3299)" is not valid.
Error at Data Flow Task [Derived Column 1 [2683]]: Failed to set property "Expression" on "input column ""Column"" (3299)".
Thanks for help..
January 7, 2009 at 12:41 pm
The error is telling you that the datatype of ["Column"] is incorrect. The REPLACE functions needs this to be a string and your column is an integer. You could get it to work with a type conversion:
[font="Courier New"]REPLACE(DT_WSTR(10)["Column"],";","") [/font]
The important thing to note here is that an integer column could not possibly have a semi-colon in it, so the replace makes no sense.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply