Reading delimited text from a file

  • From: Jason Heinrich <jheinrich@xxxxxxxx>
  • To: _oracle_L_list <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 16 Feb 2006 13:19:22 -0600

I am attempting to create a function that will return a string from a text
file, based on a user-specified delimiter such as a page-break or "|" or
even "bob".  As part of this process I am using UTL_FILE.GET_RAW to read a
block of the file and converting it to text with UTL_I18N.RAW_TO_CHAR.  The
problem is, RAW_TO_CHAR converts DOS line breaks (CRLF) into Unix line
breaks (LF), and I want to retain the original intact.  I've done some
hunting through the documentation and Google and so far I haven't seen any
solutions, either to read the data for me or to convert from raw to char

So I have 2 questions:
1) Is there something already freely available to read a text file based on
a user-specified delimiter (am I reinventing the wheel)?
2) If not, does anyone know of a way to convert raw data to text while
preserving line breaks?

This seems like something basic, and that I'm overlooking the obvious...

Jason Heinrich
Oracle Database Administrator
Pensacola Christian College


Other related posts: