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!

Split column into rows

ANNECJul 16 2015 — edited Oct 20 2017

I would like to parse a clob field.

The clob field is a teacher's comment.

Data like:   Gian is a pleasure to have in class.

or multiple comments like : Enya is a pleasure to have in class. Focuses well on topic being studied.Effort grade is A.

StudentID    Comment_value

20               Gian is a pleasure to have in class.

21               Enya is a pleasure to have in class.Focuses well on topic being studied.Effort grade is A.

I would like to parse it use deliminater period.

Will be like this:

StudentID   Comment_value

20               Gian is a pleasure to have in class.

21               Enya is a pleasure to have in class.

21               Focuses well on topic being studied.

21               Effort grade is A.

Note I still like the period at the end of the sentences in each row.

I tried something like this: but it does not work. it seems it only returns the first occurrence.

Select studentid, regexp_substr (comment_value, '[^.]+.', 1, rownum)

from storedgrades

Thanks,

This post has been answered by Solomon Yakobson on Jul 19 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2015
Added on Jul 16 2015
19 comments
974 views