Script Component VB

  • I am trying to write a vb script in a script component to find and remove lf/cr's. Can anybody help? Do i need to have a RegEx?

    Thank you all in advance...

  • If that is all that you are doing, why not just use a derived column?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I tried using the derived column with the replace(column, "\r", "") and the data is still not getting the the right columns in the database. It appears that despite the fact that the file should be fixed length some of the rows have a carriage return too early. I was hoping to maybe just pad it with trailing zeros. To be honest i dont even need that last column and tried omitting it but the data still gets messed up when i import it. Any suggestions?

  • Can you paste some sample source data? It might help me (and others) come up with ideas. Use [CR] and [LF] to designate where the carriage returns and line feeds are ...

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I attached two rows of test data. The first one is correct and the second one is cut off. I put a CR at the end of each row.

    Thanks again...

  • I tried replacing the last column with 173 random characters to extend the row on those which are incorrect and it still imports incorrectly. I don't need that data I just want to get everything else to import into the correct columns.

  • Paul,

    Can you post the actual data?

    Ian

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply