How to Convert from Long Raw to BLOB/CLOB using PL/SQL (Doc ID 1012454.7)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 8.0.6.0 and later
Oracle Solaris on SPARC (32-bit)

Goal

 

This article contains information on how to convert LONG/LONG RAW  into BLOB/CLOB using PL/SQL.

To convert
LONG/LONG RAW with any size to BLOB/CLOB the SQL functions
  • to_lob()
  • to_clob()
can be used in Oracle 10gR2 (10.2.0.1) and higher.You can apply this function only to a LONG or LONG RAW column, and only in the select list of a subquery in an INSERT statement - NOT in PLSQL as conversion function.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms