Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get a single from flat file and split them into multiple lines while querying using External

DINESH EDVINJun 23 2017 — edited Jun 23 2017

Hi,

I have a flat file which fixed length format file. Total length of each line is 1000 and Total no.of records are 50.

I want to split each line into 5 records based on the positions.

Example:  1. Taking the first line from flat file.

               2. Position 1 to 100 should be in one row

               3. Position 101 to 200 should be in second row

               4. Position 201 to 300 should be in third row

               5. Position 301 to 400 should be in fourth row

               6. Position 401 to 500 should be in fifth row

               7. Totally 300 records should be returned after creating External table and Querying the data from flat file.

               8. I will need to load those records into a Oracle Table then.

Is the above scenario possible in External table?

If no, please suggest me an alternative solution to load the data from flat file to Table with above scenario.

Thanks in Advance,

Dinesh.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2017
Added on Jun 23 2017
5 comments
343 views