locked
How to remove carriage return to unwrap flat file RRS feed

  • Question

  • Hey yall,

    So I am starting to create a process where I will be loading some info from a file to SQL tables. The problem is the vendor sends us wrapped files. Currently our process consists of manually doing a find and replace where we find '~clm' and replace it a blank. This is our way of unwrapping the file. 

    Does anyone know of a way to unwrap this within an ssis package?

    Here is a preview of some data. 

    

    so when we do a  find '~clm' that we have to type in to remove the carriage return at the end of each line. 

    Please let me know if you know of any ways to do this!

    Thanks,

    Lyndsey


    Lyndsey Cupit


    • Edited by LyndseyCupit0913 Tuesday, May 24, 2016 6:16 PM changed title to flat file
    Tuesday, May 24, 2016 6:15 PM

Answers

  • Hi LyndseyCupit0913,

    If you want to remove all carriage return in Flat file, please using Replace function in the Derived Column Transformation in SSIS.

    For example: the expression “REPLACE(aaa,"\x000D","")” means replacing the carriage return as blank in column [aaa].

    For more details, please check this link.

    Regards,

    Seif


    • Edited by Seif Wang Wednesday, June 1, 2016 1:49 AM
    • Proposed as answer by Seif Wang Thursday, June 2, 2016 11:29 AM
    • Marked as answer by Eric__Zhang Sunday, June 5, 2016 9:15 AM
    Wednesday, June 1, 2016 1:48 AM

All replies

  • Hi Lyndsey,

    set '~clm' as your row delimiter


    Arthur

    MyBlog


    Twitter

    Friday, May 27, 2016 4:58 PM
  • Hi LyndseyCupit0913,

    If you want to remove all carriage return in Flat file, please using Replace function in the Derived Column Transformation in SSIS.

    For example: the expression “REPLACE(aaa,"\x000D","")” means replacing the carriage return as blank in column [aaa].

    For more details, please check this link.

    Regards,

    Seif


    • Edited by Seif Wang Wednesday, June 1, 2016 1:49 AM
    • Proposed as answer by Seif Wang Thursday, June 2, 2016 11:29 AM
    • Marked as answer by Eric__Zhang Sunday, June 5, 2016 9:15 AM
    Wednesday, June 1, 2016 1:48 AM