• Frank! That was incredibly helpful! It now works...well, it runs...however, my linebreaks are still there...

    question, since I dont know for sure, but is vbLf like line feed? perhaps I also need to test for something like vbCr for carriage return?

    here is what ended up working:

    If Row.Comments.ToString.Contains(vbLf) Then

    Row.CommentsClean = Row.Comments.ToString.Replace(vbLf, "")

    Else

    Row.CommentsClean = Row.Comments.ToString

    End If

    Frank Bazan (2/12/2008)


    Hi Cory,

    My apologies, the explanation wasn't particularly detailed.

    1st thing to do is drop the script component editor on the the dataflow, between your OLE DB Source and your flat file destination. You will be asked what kind of script you want. Choose "Transformation".

    Then drag the pipeline from your OLE DB source to your script component. Once you have connected these, the upstream columns will be available to your script.

    Next, go to the tab [Input Columns] where you will see a list of columns. Check the one which you are using as part of the transform (Comments I think you said).

    Now, go to [Inputs and Outputs], expand "outputs" and highlight the folder "Output Columns". Add a column to this output and name it whatever you want ensuring that you have assigned it the correct datatype. (In your case will likely be DT_WSTR).

    Finally, go to [script] and write your code. Intellisense should give you most of the info you need (type "Row." and you will find that the input and output columns should appear in a drop down box).

    Let me know if you are still have probs.

    Cheers

    -- Cory