Script Task Carraige Return

  • I have a script task that takes XML data and puts it into a text file, works fine.

    Problem is when I go to import the text file I get an error

    "The last row in the sampled data is incomplete. The column or the row

    delimiter may be missing or the text is qualified incorrectly."

    I have a Carriage Return and Line Feed in there at the end on its own line

    that is causing a problem to import into SQL, how do I get rid of it?

    I have to put the Carriage Return and Line Feed in to make new lines so how

    do I get rid of this last line?

    Thanks!

  • Modify your script task slightly to not insert the final <CR><LF>? Or is that too obvious?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Phil Parkin (10/20/2010)


    Modify your script task slightly to not insert the final <CR><LF>? Or is that too obvious?

    Relax. The week is almost in the middle. It is almost weekend 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • da-zero (10/20/2010)


    Phil Parkin (10/20/2010)


    Modify your script task slightly to not insert the final <CR><LF>? Or is that too obvious?

    Relax. The week is almost in the middle. It is almost weekend 🙂

    🙂 You're right. I'm off to do some yoga.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I did, still appears.

    Thanks for the obvious, I'm not that new.

  • Are you saying that your script task does not put the characters there but that something else does?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • If you really can't get rid of those final characters (because apparently some "inverse-thief" puts them there), you can always try to put some bogus data in there and then get rid of it again with the condition split.

    Dirty, but it works.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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