none
Which datatypes are not supported by REPLACE string function. RRS feed

  • Question

  • Hi All,

    I'm usring derived column transfermation in one dataflow task. I want to replace some special characters( '®' '™' ',' ) with some number. I have a column( Description ) datatype is DT_TEXT, which is not supported by REPLACE string function. How can i reslove my problem, and let me know which datatypes are not supported by REPLACE string function.

    Friday, June 8, 2012 7:22 AM

Answers

  • REPLACE works only with the DT_WSTR data type. character_expression1, character_expression2, and character_expression3 arguments that are string literals or data columns with the DT_STR data type are implicitly cast to the DT_WSTR data type before REPLACE performs its operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Cast (SSIS Expression).

    This quote comes directly from the MSDN page about REPLACE:

    http://msdn.microsoft.com/en-us/library/ms141196.aspx


    MCTS, MCITP - Please mark posts as answered where appropriate.

    Friday, June 8, 2012 7:24 AM

All replies

  • REPLACE works only with the DT_WSTR data type. character_expression1, character_expression2, and character_expression3 arguments that are string literals or data columns with the DT_STR data type are implicitly cast to the DT_WSTR data type before REPLACE performs its operation. Other data types must be explicitly cast to the DT_WSTR data type. For more information, see Cast (SSIS Expression).

    This quote comes directly from the MSDN page about REPLACE:

    http://msdn.microsoft.com/en-us/library/ms141196.aspx


    MCTS, MCITP - Please mark posts as answered where appropriate.

    Friday, June 8, 2012 7:24 AM
  • and let me know which datatypes are not supported by REPLACE string function.

    Hello,

    Replace expects a character expression, so the data types (N)(VAR)Char are supported, all other datatypes are not supported.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    Friday, June 8, 2012 7:26 AM