Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Embedded CTRL-ENTER in Text File??
This ain't what you wann hear but...The other answer you got is correct.
\0x0d\0x0a = chr(13)||chr(10) = carriage return + line-feed (not control-enter)
what are you using to view your sybase output?
look closely,
ms-dos/win systems use 0d 0a as the end-of-record mark, so, if your
records contain 0d 0a, you're hosed because you can't tell an
end-of-record from an embedded crlf.
If you're using a unix system: unix uses 0a (without 0d) as an end-of-record mark so you stand a better chance of making something logical out of your sybase dump.
You'll probably need to setup a perl, vb, or... program to clean-up your sybase data before loading it into oracle.
Sounds like your records lengths are variable...that's going to make it
tough.
Are you're fields comma-delimited ? Are your alpha fields quoted ? If
so, that'll make the job easier.
Can you alter your sybase dump routine to put some character at the
start of your record for you to use
as a marker in determining which crlfs are end-of-record and which are
embedded in your strings ?
Are these really huge files ? If not, you might want to write some PL/SQL on the oracle side to load the data using UTL_FILE and do your conversions there.
Hank Riehl wrote:
>
> We have several ASCII delimited files which are table-outputs from Sybase
> we want to bring into Oracle via SQL*Loader.
>
> Some longer VARCHAR2 columns have data which contain embedded CTRL-ENTERs,
> for user-formatting within the column (bullet lists, etc.). Sybase's
> ASCII-file outputs the embedded CTRL-ENTER as "\x0d\x0a".
>
> Does anyone know what character-combination I must replace this with (in
> Wordpad) so that Oracle will interpret the same meaning... and
> "embedded-ENTER"? An answer from another newsgroup indicated...
> CHR(13)||CHR(10)
> but I'm afraid that Oracle will simply inpertret these as literal
> characters on the import rather than special-meaning control-characters.
>
> Can anyone verify that this is correct, or if not, what it should be?
>
> Thanks
--
Adrian Hands
Raleigh, NC
panic: attempt to recv circular datagram in round socket!
panic: stack pointer is read-only!
$
Received on Sat Aug 08 1998 - 15:24:49 CDT