locked
derived column cannot convert between unicode and non-unicode string data types RRS feed

  • Question

  • i have a problem with my data flow

    my flow is ole db data source-->derived column-->ole db destrination

    at the derived column trasformation a add a new column called "entity_code"

    the expression for enttity code is:  (DT_WSRT,100)(TRIM(inst_c)+TRIM(dept_c))

    the two columns inst_c and dept_c are from the table in my old db source

    anyway, i get a message: column "entity_code" cannot convert between unicode and non-unicode string data types.

    i tried using import and export wizard but it didnt help. oce i added the derived column i got that message at the destination.

    i tried entity_code in DT_STR cast type but that didn't help either.

    TIA

    

    Sunday, November 11, 2012 11:52 AM

Answers

  • Hi gilboa,

    This behavior of Derived Column transformation is by design. As a workaround, you can right click "Derived column" transform on your data flow task, "show advanced editor", select "Input and Output properties" tab, expand "Derived Column ouput" node and then change the data type of the corresponding columns from DT_STR to DT_WSTR. Details about the issue please refer to the link: http://connect.microsoft.com/SQLServer/feedback/details/336139/cant-change-data-type-in-derived-column-transform

    Please feel free to ask if you have any question.

    Thanks,
    Eileen


    Eileen Zhao

    TechNet Community Support

    • Marked as answer by Eileen Zhao Monday, November 26, 2012 6:44 AM
    Wednesday, November 14, 2012 9:14 AM

All replies