Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

BCP multiline strings

3 posts in Windows NT Last posting was on 1999-12-13 13:21:05.0Z
Jan Franek Posted on 1999-12-09 13:16:11.0Z
Message-ID: <384FAB9B.44C7A167@fio.cz>
Date: Thu, 09 Dec 1999 14:16:11 +0100
From: Jan Franek <Jan.Franek@fio.cz>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: cs,en
MIME-Version: 1.0
Subject: BCP multiline strings
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 17
NNTP-Posting-Host: sf.vol.cz 212.27.195.231
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2854
Article PK: 1090291

I want to move data in one table from one server to another. Server
versions and OS are the same (ASE 11.9.2 on NT). One column of the table
is intented to hold some comments. It is varchar(255) and it can
contains multiline text.

When I try to move the data with BCP in character mode (-c), EOLs in my
comments column create unexpected line breaks in output file and it's
impossible import this file into new server. I tried also native mode
(-n) without success - when I try to import file, BCP prints error
message "Negative length-prefix found in BCP data-file."

Any idea, how to transfer multiline text ?

J. Franek


AnaMaria Stirbet Posted on 1999-12-09 17:26:30.0Z
Message-ID: <384FE646.98573083@sybase.com.no.spam>
Date: Thu, 09 Dec 1999 12:26:30 -0500
From: AnaMaria Stirbet <astirbet@sybase.com.no.spam>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.5 [en]C-CCK-MCD (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: BCP multiline strings
References: <384FAB9B.44C7A167@fio.cz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 25
NNTP-Posting-Host: astirbet-pc.sybase.com 172.31.140.205
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2848
Article PK: 1090285

Hi Jan,

The key here is to have as column and row delimiters characters that are not
part of any string in the file. They can be groups of characters, even
something like ~@~$~.
But the file has to be build that way.

Hope this helps,

AnaMaria Stirbet
Sybase TS

Jan Franek wrote:

> I want to move data in one table from one server to another. Server
> versions and OS are the same (ASE 11.9.2 on NT). One column of the table
> is intented to hold some comments. It is varchar(255) and it can
> contains multiline text.
>
> When I try to move the data with BCP in character mode (-c), EOLs in my
> comments column create unexpected line breaks in output file and it's
> impossible import this file into new server. I tried also native mode
> (-n) without success - when I try to import file, BCP prints error
> message "Negative length-prefix found in BCP data-file."
>
> Any idea, how to transfer multiline text ?
>
> J. Franek


Jan Franek Posted on 1999-12-13 13:21:05.0Z
Message-ID: <3854F2C0.B393975C@fio.cz>
Date: Mon, 13 Dec 1999 14:21:05 +0100
From: Jan Franek <Jan.Franek@fio.cz>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: cs,en
MIME-Version: 1.0
Subject: Re: BCP multiline strings
References: <384FAB9B.44C7A167@fio.cz> <384FE646.98573083@sybase.com.no.spam>
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 28
NNTP-Posting-Host: sf.vol.cz 212.27.195.231
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2830
Article PK: 1090269

Hi,

it works great. Thank you

J.Franek

AnaMaria Stirbet wrote:
>
> Hi Jan,
>
> The key here is to have as column and row delimiters characters that are not
> part of any string in the file. They can be groups of characters, even
> something like ~@~$~.
> But the file has to be build that way.
>
> Hope this helps,
>
> AnaMaria Stirbet
> Sybase TS
>
> Jan Franek wrote:
>
> > I want to move data in one table from one server to another. Server
> > versions and OS are the same (ASE 11.9.2 on NT). One column of the table
> > is intented to hold some comments. It is varchar(255) and it can
> > contains multiline text.
> >
> > When I try to move the data with BCP in character mode (-c), EOLs in my
> > comments column create unexpected line breaks in output file and it's
> > impossible import this file into new server. I tried also native mode
> > (-n) without success - when I try to import file, BCP prints error
> > message "Negative length-prefix found in BCP data-file."
> >
> > Any idea, how to transfer multiline text ?
> >
> > J. Franek