xp_sendmail

  • I'm using xp_sendmail to send a result via e-mail.  The result set is saved in a text file.  The problem is that an extra carriage return is added to the end of every row, so the result set is printed in double space.  How can I rid of the carriage return or bottom line just make the result set come out single spaced like in query analyzer?

  • can you post your script


    Everything you can imagine is real.

  • Did you check there really is double CR? Maybe the rows are just too long to fit on one line of text, but the part that is wrapped to another line is just trailing spaces?

    As bledu said, please post the script that creates the file.

  • 1. have you examined the file in a 'neutral' editor that does NO reformating? Or in one that displays the hexidecimal equivalent of the actual text? Is each line ending with both ASC(10) and ASC(13) - aka LF (linefeed) and CR (carriage return)? or is it storing something else at the end of each line?

    2. is it possible that a transformation is occurring as the file is sent through the email? In emails I receive, which show the forwarding trail, I can identify where the content was duplicated by the email tool used, and where the spacing was changed, etc... in short, the problem may be in the email, not the file. If so, then you will probably need to modify the email header (if this will even make a difference?).

    Without seeing the script, it's hard to tell what's what.

Viewing 4 posts - 1 through 3 (of 3 total)

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