Textfile has two sets of CRLF row delimiters.

  • When results are sent to a textfile from a stored procedure, two sets of CRLF are written as the row delimiter. Does anyone know what may be causeing this? The file must have only one set of CRLF.

    Thanks for your help.

     

  • how are you sending it to text file ?

    via bcp? dts? query analyser?

    MVDBA

  • When executing the stored procedure in Query Analyzer and sending the results to a text file, two sets of CRLF delimiters are written as row delimiters.

    When exeucting the stored procedure from a DTS package, only one set of CRLF delimiters is written, as expected. (There are other issues with executing the stored procedure from DTS and I won't go into those here.)

    Thanks.

     

     

  • i'm guessing then that this is one of the settings on the options menu of query analyser......

    but i'm not sure that i can see any that do this.

    MVDBA

  • Remember Query analyzer is just a developer utility which can display most data.

    it interprets (char10) OR char(13) as a new line;

    for example:

    select 'text'+ char(10) + char(13) + 'vbCrLf' + char(10) + char(13) + 'vbCr' + char(10) + 'vbLf' + char(13) + 'End'

    generates these results:

    ---------------------------

    text

    vbCrLf

    vbCr

    vbLf

    End

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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