Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Error using TO_LOB on LONG RAW field in select statement
matsla_at_hotmail.com (Mats L) writes:
> Hi!
>
> Is it possible to convert a LONG RAW field to a BLOB and then use
> utl_raw.cast_to_varchar2 like below. I get followiung error.
>
> select utl_raw.cast_to_varchar2(dbms_lob.substr(TO_LOB('long raw
> field'),10,1)) from t
>
> ORA-00932: inconsistent datatypes: expected - got BINARY
From the SQL language reference manual (a96540.pdf):
"TO_LOB converts LONG or LONG RAW values in the column long_column to LOB values. 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."
Harald Received on Wed Sep 17 2003 - 04:43:49 CDT