Re: Help with carriage return in varchars

From: ProNews/2 User <kiyoinc_at_ATTGlobal.XOUT.net>
Date: Sat, 21 Jul 2001 21:43:05 GMT
Message-ID: <hdwX38NCLQJC-pn2-jMvTdYBmjqhE_at_localhost>


On Thu, 24 May 2001 01:40:55, "Matt B." <mcb_at_ds.znet.com> wrote:

> "wayne" <no_at_email.please.com> wrote in message
> news:9ehkht$8ob_at_dispatch.concentric.net...
> > > Could someone please provide some advise on how to store a carriage-return
> > > (like \n in C++) in a VARCHAR2 field?
> >
> > I have loked into this in the past... My solution was to create the DB with
> > the Windows character set (ISO2259P1, or something like that... Actually,
> > please go look it up in the docs, I am positive this is wrong!).
> >
> > With the windows character set I could store from character 0 to 255, I was
> > surprised I could store character 0... Anyway, since a CRLF is chaar(10) +
> > char(13) you should have no problem if you use the windows character set.
> >
> > In the other character sets you may have your characters translated, so if
> > you try to store a char(10) it may get translated to something else (like
> > "?").
>
> The above is mostly correct, although it's not "char" but rather "chr". e.g.:
> chr(10), not char(10).
>
> -Matt

It's also not chaar(10) either.

Whatever.

Anyway, storing a CRLF should be done with some trepidation.

The problem arises when you export the data. How do you delimit rows of ASCII data when a field can contain a CRLF?

There are ways to work around it but you should think through how you will use the data and what systems you'll exchange data with.

See my musings on Oracle data interchange at

         http://www.kiyoinc.com/nxtract.html Received on Sat Jul 21 2001 - 23:43:05 CEST

Original text of this message