by SybaseNeal <nstack21@[EMAIL PROTECTED]
>
Jun 25, 2008 at 09:16 AM
Hello,
With image or text data that contains embedded control characters such
as \t or \n you must be careful.
1) Either bcp out in the native format (-n):
bcp.exe au12..au_log out c:\temp\test.rar -Usa -P -n -T 123456789
(123456789 is the maximum size of the text/image column in your table
+ a little extra
The default maximum text/image size will be 32768. Anything larger
will be truncated
unless you use the "-T" parameter).
NOTE: Files copied out in the native format (-n) can only be used on
the platform they were created.
Don't try to take a native bcp file created on Windows and use it on
Solaris.
2) If you want the data in a character format (-c) you can use the
following command but
you must specify row & column terminators that you are sure are not in
your data:
bcp.exe au12..au_log out c:\temp\test.rar -Usa -P -c -T 123456789 -
t "^%^%" -r "$~$~"
If you do not specify "-t" and "-r" the default row terminator is "\r
\n" (on Windows) and the
default column terminator is \t. So if your text/image data also has
these characters bcp
will become very confused.
Thanks,
Neal
p.s. You can type the following command to find the maximum text
length of your column
to help you decide what a good value for "-T" might be:
select max(datalength(logfile)) from au12..au_log