Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Error using TO_LOB on LONG RAW field in select statement

Re: Error using TO_LOB on LONG RAW field in select statement

From: Harald Maier <maierh_at_myself.com>
Date: Wed, 17 Sep 2003 11:43:49 +0200
Message-ID: <m3he3bvjfu.fsf@ate.maierh>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US