Home » RDBMS Server » Server Utilities » SQL Loader
SQL Loader [message #250816] Wed, 11 July 2007 07:28 Go to next message
Messages: 1
Registered: July 2007
Junior Member
I have a flat file that spans multiple lines for one given record. The format of the file is variable length records. Each line has a carriage control character. Each line has multiple fields to capture. Also, the number of lines per record vary. How can I read/load each specific field for each line into a table?

I've attached a sample file (test_file.txt). The record starts at position 10 thru 12 ('ST ') and ends at 10 thru 12 ('SE ').
  • Attachment: test_file.txt
    (Size: 17.50KB, Downloaded 306 times)

[Updated on: Wed, 11 July 2007 07:47]

Report message to a moderator

Re: SQL Loader [message #250818 is a reply to message #250816] Wed, 11 July 2007 07:31 Go to previous messageGo to next message
Michel Cadot
Messages: 65154
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format.
Please always post your Oracle version (4 decimals).

Please post an example of your data, a description of your table and the result you should have with the data you provide.

Re: SQL Loader [message #250820 is a reply to message #250818] Wed, 11 July 2007 07:39 Go to previous message
Messages: 3727
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Take a look at Assembling Logical Records from Physical Records in the manual.

If that is not suitable, you will need to pre-parse the file in another language (say, Perl) to assemble the physical records.

Ross Leishman

[Updated on: Wed, 11 July 2007 07:41]

Report message to a moderator

Previous Topic: Export and import utility
Next Topic: Using sql loader of 9i client to load data on Oracle 10g.
Goto Forum:

Current Time: Wed Aug 23 01:26:23 CDT 2017

Total time taken to generate the page: 0.08365 seconds