Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Best way to parse strings in PL/SQL
Maybe use dbms_pipe and do your parsing with Perl?
David Sisk wrote:
> I've got a big batch of ascii data coming in via the UTL_HTTP package. It's
> pretty slick for getting the data, but man is it ugly to try to get it into
> columns. The majority of it is comma delimited values, but then there's
> some lines that are different (such as comma delimited column headers, plus
> some header data that is not comma delimited). Each line has a CRLF
> character behind it. Finally, this may be 10K or more of data, but it's
> split into 2K chunks, which does not necessarily split it where the CRLF's
> are. Some of the numeric values include fractions rather than decimal
> numbers.
>
> I want to take the first two lines (meaning lines ending with a CRLF) and
> seperate the string into data to go into columns in one table, then take the
> remaining lines and seperate those into data to go into columns in a second
> table. Essentially, take this ugly bunch o' stuff and insert it neatly into
> the necessary table columns.
>
> I'm a competent DBA, but not an expert PL/SQL developer. So, using PL/SQL,
> does anyone have any recommendation on the best way to do this task? Any
> functions that might prove very useful, etc.?
>
> Best regards,
>
> --
> David C. Sisk
> Need tech info on Oracle? Visit The Unofficial ORACLE on NT site at
> http://www.ipass.net/~davesisk/oont.htm
> Like original modern rock? Listen to song samples and buy a CD at
> http://www.mp3.com/disparityofcult
> Raleigh music compilation! All $$$ go to NC Food Bank.
> http://www.mp3.com/whisper2ascream
Received on Mon Apr 24 2000 - 00:00:00 CDT