Skip to content
Advertisement

Split CLOB column based on new line – Oracle SQL

I have a table

table1

  • f_content is CLOB
  • f_name is varchar2 (4000)

I have written this SQL:

My expected output is:

However in the output based on the SQL above, I am only getting line_num = 1.

How can I get the SQL code working so it gives all the lines?

Advertisement

Answer

You can use a hierarchical query without a JOIN condition :

Demo

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement