Print CLOB content out as is in Oracle SQL script

后端 未结 4 1351
一向
一向 2021-01-25 18:09

To start with here is the bigger picture of the task I\'m trying to do. I need to create a xml file from the results of the particular SQL request and store it in a file on the

4条回答
  •  孤城傲影
    2021-01-25 18:33

    You can add a delimiter and print out 254 characters, then in notepad++ (in extended mode ~\r\n) replace this delimiter :

     loop exit when l_offset > dbms_lob.getlength(v_xml);
       DBMS_OUTPUT.PUT_LINE (dbms_lob.substr( v_xml, 254, l_offset) || '~');
       l_offset := l_offset + 255;
      end loop;
    

提交回复
热议问题