Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: Help needed for bcp queryout

    Hi

    I'm trying to export data using the bcp command with queryout into a simple text file, which I can then read into another application (not SQL).

    It's working ok, except that some of the data contains non-ASCII characters, specifically newline or carriage returns so the lines in my text file are being split.

    I don't seem to be able to find a solution to this problem - I can't use the native arguement because I don't want to read the data back into SQL and I've played around with -w option without success.

    I don't really want to replace the non-ASCII characters first or try to detect and concatenate split lines after the text file has been created (both seem tacky to me!) Does anyone have a solution?

    Thanks.

  2. #2
    Join Date
    Sep 2002
    Location
    Montreal, Canada
    Posts
    224
    Provided Answers: 1

    Re: Help needed for bcp queryout

    Originally posted by Peter Bullock
    Hi

    I'm trying to export data using the bcp command with queryout into a simple text file, which I can then read into another application (not SQL).

    It's working ok, except that some of the data contains non-ASCII characters, specifically newline or carriage returns so the lines in my text file are being split.

    I don't seem to be able to find a solution to this problem - I can't use the native arguement because I don't want to read the data back into SQL and I've played around with -w option without success.

    I don't really want to replace the non-ASCII characters first or try to detect and concatenate split lines after the text file has been created (both seem tacky to me!) Does anyone have a solution?

    Thanks.
    Well if you have non ASCII characters, then I would definitely NOT recommend exporting to text files... unless you want problems and lots of work...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •