Skip to Main Content

SQL & PL/SQL

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!

Read Data from CLOB and insert records one by one into target table

user5770194Sep 11 2015 — edited Jan 12 2016

Hi Guys,

  Need your suggestion for reading records one by one from CLOB column to inserting it into table.

  For example: Data in CLOB as follows

  NAME,AGE,GENDER,DOB,PHONE,ZIP (HEADER Column)

  AMIT,33,M,08/26/1982,1112221111,11223 (Data)

  SAM,30,M,08/26/1985,1113331111,11223

  ANU,28,F,08/26/1987,1114441111,11223

  MARK,25,M,08/26/1990,1115551111,11223

  Target Table Column

  NAME

  AGE

  GENDER

  DOB

  PHONE

  ZIP

  I am able to

  A) fetch CLOB data

  B) Reading one line at time (Using utl_file for this)

  Having challenges for insert, Is anything available inbuilt which can insert record from CLOB to table?

  As of now, i am thinking of using SLIPT by COMMA (,) and preparing generic insert statement, but i feel this is crude way to doing this.

  Do you guys suggest any better way to achieving this.

  Please share your views.

-

Regards

Amit

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2016
Added on Sep 11 2015
39 comments
12,062 views