Carriage Return + Line Feed RRS feed

  • Question

  • I have massive data being imported to text files from the database (from production environment) using BCP command, which gets loaded to my reporting environment via bulk load method. I am trying to do some cleansing to this data, so that I could replace line feed + carriage spacing. Since bulk loading the data caused this job to fail too many times, I am trying to rewrite this package to get the data from the text file, do some transformation etc, and then send it to OLE DB destination.

    So lets say: My output column name (description) has some cleansing to do. I do know the syntax:

    REPLACE( «character_expression», «search_expression», «replace_expression» )

    How do I accomplish:

    REPLACE ([Description], CHAR(10)+CHAR(13), "")


    Thanks in advance.

    Also, please suggest a better way to do this, if there is any.



    Wednesday, July 21, 2010 4:32 AM


  • You'd use REPLACE([Description], "\r\n", "") - see the SSIS literals page, the section on strings.
    Todd McDermid's Blog Talk to me now on
    Wednesday, July 21, 2010 4:55 AM