Skip to Content.
Sympa Menu

freetds - Re: [freetds] passing a newline row terminator to freebcp

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] passing a newline row terminator to freebcp
  • Date: 11 Mar 2003 08:21:51 -0800

On Fri, 2003-03-07 at 14:39, Lowden, James K wrote:
> Maybe this is a freebcp question, maybe not.
>
> Many of my bulk data files are delimited with one backslash between the
> columns; rows are terminated with two characters: backslash+newline.
>
> I eventually came up with a (shell-specific) way to pass the newline to
> freebcp:
>
> $ freebcp D..T in F -eT.err -c -t\\ -r\\$'\n' -S S -U U -P P
>
> which is OK, if you like bash.
>
> Does Sybase's bcp do this the same way, or does it recognize the
> two-charcter string "\n" as a newline? And, what should we do?

Sybase's bcp does understand \n as newline. Also \r and \0 (null byte)

Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler AT peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html




Archive powered by MHonArc 2.6.24.

Top of Page