Output to text file without line feed

  • I need to output the result set of a query to a text file, but each row should only have a carriage return (13) and no line feed. It appears that by default SQL automatically adds these characters. Any suggestions on how to accomplish this would be greatly appreciated.

  • Mark Rice (3/29/2011)


    I need to output the result set of a query to a text file, but each row should only have a carriage return (13) and no line feed. It appears that by default SQL automatically adds these characters. Any suggestions on how to accomplish this would be greatly appreciated.

    SSIS flatfile output and you can define your row terminator.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Craig - thank you so much for the quick reply.

    We found that the method you suggested will work, and we also found a way we could do this using bcp.

  • Mark Rice (3/30/2011)


    Craig - thank you so much for the quick reply.

    We found that the method you suggested will work, and we also found a way we could do this using bcp.

    Would you post your bcp method so that others that read this forum may learn as you have benefited from Craig Farrell

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

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

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