bcp newline characters (\r\n)
Posted on 2002-04-24
I am creating a format file out of my MS SQL 2000 table, by executing:
bcp <DBName>..<table> format <path>\_format.txt -f <path>\format.txt -S <server> -c -t "" -r \n -U<user> -P <pswd>
Note, that I am overriding the default Row-Terminator parameter with "\n" (newline) character. However, the bcp automatically prefixes the "\r" (carriage return) in front of my "\n" (newline). And in created format file I have "\r\n" instead of "\n".
The problem is that I do mean that row terminator is "\n" and not "\r\n". (This is how I get files from my provider.)
Does anyone knows how to turn off OR workaround this "artifical intelligence" and have "\n" as a row-terminator?